2100 |
Can bars have a grey backcolor and black border color for a summary-bar (EBN)
with AxG2antt1 do begin BeginUpdate(); with VisualAppearance do begin RenderType := -2; Add(1,'gBFLBCJwBAEHhEJAAEhABN0GACAADACAxRDAMgBQKAAzQFAYahuGSGAAGMYxQgmFgAQhFcZQSKUOQTDKMIziYBYJhEMQyDAAUIjOKsIhkGYcZAGQBJCjWGodQLOEgwHI' + 'ERQjEyUJAGGQIHhyPYbUbGUpQHKkeRtGqgBgoKhKEouNYgAbGYIwTRsdyfDSXBpEWwbDgkNQwWTDNoRDIUQStCysaYjOpnfrUAJ1P7FdQ1NJkXRhGSSK7maapaiCSZ6S' + 'TCMj1FhVKSNJ7DQKhGpgKh/ApgYpQOK4fLNXyRBK4QAyKA6bgPFZOZbFViaXY1V5bNKrcjhHQwAyHJ4XXRdV4YRAkUT4GqiJKGSYcQhuXZWbRqO6ABhef6DRThc6jKpF' + 'HIE4llEcojHqSZNgoIxnlgd5thsLREleL43gsYZ9BkaAYkMAgAm+CxGDWWAtiKCRfjcdRgHoHYnicUwgAIEIREAaQYkcQZUHIGRUDQJBOEYRAhDYCxGgMZAkCgdYQhaX' + 'QIAYERwQuahXggdgeG6VZ4H4IhdiIGIOB8YIiGiHZZgqYpGF4KYHiKCI+CAU5jCiTQ2g0YhEFyax4gABAEIC'); Add(2,'gBFLBCJwBAEHhEJAAEhABU0IQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRhGcTAJBMIhiGQYAChEZxVhEMgzDjIAxSJAcQRFESaAABGCQGh' + '+N4/S4NIi0CIsZQjCaiZ7pKA5bgMCo+UrNMixZQVCSOGChYRpCaZWpGGodQRUFbVHAlKypJKCKrEWSrDhuYAAW7XM7yBS1TzVNSuLZtaLqSroAJ1WTWMB0Ra8NzZEKfa' + 'ZACj4arKejrRDCMAggI='); Add(3,'gBFLBCJwBAEHhEJAAEhABN8GACAADACAxRDgMQBQKAAzQFAcDBvBgABiHEZoJhUAIIRZGMIjFDcEwxDSMY7jcYAFgkNQwCUtcBIJDEMIoAJLIwyBKkNQ5AabYrmWJpMg' + 'OEAyDSJM70DCEThLD4aZJnOa5ZjmH5LRBQdBRXQMYwIGCiZQpeKqbgMBoJApCIJxdBNLAAf60LLtGJaSpKZouViJNjSBD4HQTL6BQwsKxIDqaaD/WpgFuLTjiRImShcM' + 'QXJYFbwTOyBbDjG7rJr+FptYRbdYYRQ8dy7Cywa6pOa8YwacotZrAdDXHTmHw1PTRNDmTRYRwfKqJZxieqwHoMLYgAC8Ni3OaoDAiCRQGiYZyHKaRSwPBInIYIIjeRgz' + 'BSAYKCEOySEodZbjybo0HefwfhMLQDnKeg9D6LwsCeV5unYQJYH8Lxvj+a5jgSfIYH8T43hOcZ5H+X4nh2fB6F+aABnOAIfFgFgGgGH43nICoCl+eA1n0fBhAgVZ5gSH' + 'oID4FoDCCCBqBuBYUjgfgigGURYg4JoJmKCBFBaChikiNgVEYYpokYMoMCMKJWCkcIjgiZg6E0Do3gUASAg='); end; Columns.Add('Task'); with Chart do begin PaneWidth[False] := 128; FirstVisibleDate := '1/1/2001'; with Bars.Item['Task'] do begin Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18); Color := $1000000; end; with Bars.Item['Summary'] do begin Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18); Color := $2000000; end; with Bars.Copy('Summary','SummaryN') do begin Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18); Color := $3000000; end; end; with Items do begin hSummaryJ := AddItem('Summary A'); AddBar(hSummaryJ,'Summary','1/2/2001','1/2/2001','J',Nil); hTaskJ := InsertItem(hSummaryJ,Nil,'Task A.1'); AddBar(hTaskJ,'Task','1/2/2001','1/5/2001','J1',Nil); hTaskJ := InsertItem(hSummaryJ,Nil,'Task A.2'); AddBar(hTaskJ,'Task','1/4/2001','1/8/2001','J2',Nil); DefineSummaryBars(hSummaryJ,'J',-1,'<*>'); hSummaryK := AddItem('Summary B'); AddBar(hSummaryK,'Summary','1/2/2001','1/2/2001','K',Nil); hTaskK := InsertItem(hSummaryK,Nil,'Task B.1'); AddBar(hTaskK,'Task','1/2/2001','1/5/2001','K1',Nil); hTaskK := InsertItem(hSummaryK,Nil,'Task B.2'); AddBar(hTaskK,'Task','1/4/2001','1/8/2001','K2',Nil); DefineSummaryBars(hSummaryK,'K',-1,'<*>'); hSummaryN := AddItem('Summary C'); AddBar(hSummaryN,'SummaryN','1/2/2001','1/2/2001','SN',Nil); hTaskK := InsertItem(hSummaryN,Nil,'Task B.1'); AddBar(hTaskK,'Task','1/2/2001','1/5/2001','N1',Nil); hTaskK := InsertItem(hSummaryN,Nil,'Task B.2'); AddBar(hTaskK,'Task','1/4/2001','1/8/2001','N2',Nil); DefineSummaryBars(hSummaryN,'SN',-1,'<*>'); ItemBar[0,'<K*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(255); ItemBar[0,'<N*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(8421504); ExpandItem[0] := True; end; EndUpdate(); end |
2099 |
How can I display UNICODE characters
with AxG2antt1 do begin BeginUpdate(); Chart.PaneWidth[True] := 0; with Font do begin Name := 'Arial Unicode'; Size := 22; end; HeaderVisible := EXG2ANTTLib.HeaderVisibleEnum.exHeaderHidden; DefaultItemHeight := 48; (Columns.Add('') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1); with Items do begin AddItem('Ӓӓ'); AddItem('ᦜᦝ;ᦞ'); AddItem('ɮɭ;ɯ'); AddItem('勳勴勵勶'); FormatCell[TObject(AddItem(TObject(AxG2antt1.Version))),TObject(0)] := '(value lfind `UNICODE`) < 0 ? `<fgcolor=FF0000><b>!UNICODE!</b> version</fgcolor> required: ` + value : `` '; end; EndUpdate(); end |
2098 |
How can I display 12-hour time (method 2)
with AxG2antt1 do begin BeginUpdate(); with Chart do begin FirstVisibleDate := '1/1/2001'; PaneWidth[False] := 0; LevelCount := 2; Level[0].Label := TObject(4096); with Level[1] do begin Unit := EXG2ANTTLib.UnitEnum.exHour; FormatLabel := '(0 := hour(dvalue)) < 12 ? ( `<fgcolor=808080>` + ( =:0 = 0 ? 12 : =:0 ) + `</fgcolor>` ) : (=:0 - 12)'; end; end; EndUpdate(); end |
2097 |
How can I display 12-hour time (method 1)
with AxG2antt1 do begin BeginUpdate(); with Chart do begin FirstVisibleDate := '1/1/2001'; PaneWidth[False] := 0; LevelCount := 2; Level[0].Label := TObject(4096); Level[1].Label := '<%h12%>'; end; EndUpdate(); end |
2096 |
How do I scale to hours
with AxG2antt1 do begin BeginUpdate(); with Chart do begin FirstVisibleDate := '1/1/2001'; PaneWidth[False] := 0; LevelCount := 2; Level[0].Label := TObject(4096); Level[1].Label := TObject(65536); end; EndUpdate(); end |
2095 |
How do I display the position of the item with 0-padding
with AxG2antt1 do begin BeginUpdate(); (Columns.Add('Items') as EXG2ANTTLib.Column).FormatColumn := '((1 apos ``) lpad `00`) + `. ` + value'; with Items do begin AddItem('Item A'); AddItem('Item B'); AddItem('Item C'); AddItem('Item D'); end; EndUpdate(); end |
2094 |
Can I format the label in row 3 below to show day numbers, only for Mondays each week (sample 2)
with AxG2antt1 do begin with Chart do begin PaneWidth[False] := 0; FirstVisibleDate := '1/31/2009'; LevelCount := 3; FirstWeekDay := EXG2ANTTLib.WeekDayEnum.exMonday; with Level[0] do begin Label := '<%mmmm%> <%yyyy%>'; Alignment := EXG2ANTTLib.AlignmentEnum.CenterAlignment; Unit := EXG2ANTTLib.UnitEnum.exMonth; end; with Level[1] do begin Unit := EXG2ANTTLib.UnitEnum.exWeek; Label := 'Week <%ww%>'; Alignment := EXG2ANTTLib.AlignmentEnum.CenterAlignment; end; with Level[2] do begin Unit := EXG2ANTTLib.UnitEnum.exDay; FormatLabel := 'weekday(dvalue) = 1 ? day(dvalue): '''''; end; UnitWidth := 23; end; end |
2093 |
Can I format the label in row 3 below to show day numbers, only for Mondays each week (sample 1)
with AxG2antt1 do begin with Chart do begin PaneWidth[False] := 0; FirstVisibleDate := '1/31/2009'; LevelCount := 3; FirstWeekDay := EXG2ANTTLib.WeekDayEnum.exMonday; with Level[0] do begin Label := '<%mmmm%> <%yyyy%>'; Alignment := EXG2ANTTLib.AlignmentEnum.CenterAlignment; Unit := EXG2ANTTLib.UnitEnum.exMonth; end; with Level[1] do begin Unit := EXG2ANTTLib.UnitEnum.exWeek; Label := 'Week <%ww%>'; Alignment := EXG2ANTTLib.AlignmentEnum.CenterAlignment; end; with Level[2] do begin Unit := EXG2ANTTLib.UnitEnum.exDay; FormatLabel := 'weekday(dvalue) = 1 ? value : '''''; end; UnitWidth := 23; end; end |
2092 |
How can I change the caption for all bars
with AxG2antt1 do begin BeginUpdate(); Columns.Add('Tasks'); with Chart do begin FirstVisibleDate := '8/1/2017'; LevelCount := 2; PaneWidth[False] := 128; with Bars.Add('Task%Progress') do begin Shortcut := 'Task'; Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarShowPercentCaption] := TObject(True); end; end; with Items do begin AddBar(AddItem('Task 1'),'Task','8/2/2017','8/6/2017',Nil,Nil); AddBar(AddItem('Task 2'),'Task','8/3/2017','8/9/2017',Nil,Nil); AddBar(AddItem('Task 3'),'Task','8/4/2017','8/13/2017',Nil,Nil); AddBar(AddItem('Task 4'),'Task','8/5/2017','8/16/2017',Nil,Nil); ItemBar[0,'<*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarShowPercentCaption] := TObject(False); ItemBar[0,'<*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<%= %C0 replace `Task` with `Task<off 4><b>` %>'; ItemBar[0,'<*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18); end; EndUpdate(); end |
2091 |
Can't get the +/- to be displayed on a divider item. What else can I do
with AxG2antt1 do begin BeginUpdate(); LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines; TreeColumnIndex := 0; MarkSearchColumn := False; FullRowSelect := EXG2ANTTLib.CellSelectEnum.exColumnSel; HeaderAppearance := EXG2ANTTLib.AppearanceEnum($fffffff8 Or Integer(EXG2ANTTLib.AppearanceEnum.Bump) Or Integer(EXG2ANTTLib.AppearanceEnum.Sunken)); Chart.PaneWidth[True] := 0; with Columns do begin (Add('C1') as EXG2ANTTLib.Column).Width := 32; (Add('C2') as EXG2ANTTLib.Column).FormatColumn := '1 index ``'; end; with Items do begin h := AddItem('Cell 1'); CellSingleLine[TObject(h),TObject(1)] := EXG2ANTTLib.CellSingleLineEnum.exCaptionWordWrap; h := AddItem('This is bit of text merges all cells in the item (divider shows no +/-)'); ItemDivider[h] := 0; ItemBackColor[h] := $f0f0f0; ItemDividerLine[h] := EXG2ANTTLib.DividerLineEnum.EmptyLine; CellHAlignment[TObject(h),TObject(0)] := EXG2ANTTLib.AlignmentEnum.CenterAlignment; InsertItem(h,Nil,'Child 1'); InsertItem(h,Nil,'Child 2'); ExpandItem[h] := True; h := AddItem('Cell 3'); h := AddItem('This is bit of text merges all cells in the item (merge shows +/-)'); ItemBackColor[h] := $f0f0f0; CellMerge[TObject(h),TObject(0)] := TObject(1); InsertItem(h,Nil,'Child 3'); InsertItem(h,Nil,'Child 4'); ExpandItem[h] := True; end; EndUpdate(); end |
2090 |
How can I display one or more columns on the same bar
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddGroupItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddGroupItemEvent); begin with AxG2antt1 do begin with Items do begin ItemDividerLine[e.item] := EXG2ANTTLib.DividerLineEnum.EmptyLine; AddBar(e.item,'Summary','12/2/2017','12/2/2017',Nil,Nil); DefineSummaryBars(e.item,'',-3,''); l := GroupItem[e.item]; CellSingleLine[TObject(e.item),TObject(l)] := EXG2ANTTLib.CellSingleLineEnum.exCaptionWordWrap; CellBold[TObject(e.item),TObject(l)] := True; ItemBackColor[e.item] := $bebebe; end; Chart.ItemBackColor[e.item] := $bebebe; end end; // AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin Items.AddBar(e.item,'Task','12/4/2017','12/10/2017',Nil,Nil); end end; with AxG2antt1 do begin BeginUpdate(); VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhABOUGACAADACAxRDgMQBQKAAzAJBIYhiG4cYCgMZhXDOCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADCMQwAFBIbhrE4ZBjHGQRUgyI43RhHUBzVI' + 'UBxDEaTZLlEYJBgeHYhDJPcaUVDcWQHGyeZwjSgpKoWSJIU5NcggPDgEwTKCmKlTAKoSzJMyEmwWRAdVTZLSEaxierKPhyWT/XgAF4PfDFKRXFqXY5mKZJFqKOI8TxIN' + 'gxPQMGyrBqraLqKwQGrGCQKSBhUZ3dS2JR3OSlYRuQAMVgOXoDZhPWZXbDtSzPE63NgtOR5DiGWalABoeoxRa9cz3ViCJSrGTqIoINIzZLHFQbPpdAYdP6BeIjXhhZxB' + 'BuLZXmEOh9CcNoni2N4MjWVodh+DpfBeLJinsWR9AyYwVAkGBhEAFphGiRogDEGBamkFgtjcZgHiMbgehYaQhAIEIREAaQYkcQZUHIGRUGQDBOEaBAhDYDxGkMZAkCge' + 'oagYZAYEYAYIAWGhemICIFj8WIiCiFR5gkIhogmBoKGKJx2C6C5hniMgggqYwog0UoNGMZJiDiCZRgOLY0ECUAQICA=='); with Chart do begin LevelCount := 2; FirstVisibleDate := '12/2/2017'; PaneWidth[False] := 256; with Bars.Item['Summary'] do begin StartShape := EXG2ANTTLib.ShapeCornerEnum.exShapeIconEmpty; EndShape := EXG2ANTTLib.ShapeCornerEnum.exShapeIconEmpty; Shape := EXG2ANTTLib.ShapeBarEnum.exShapeSolid; Color := $1000000; Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<%=%513%>'; Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18); end; with Bars.Item['Task'] do begin Pattern := EXG2ANTTLib.PatternEnum.exPatternBox; Color := $a4a4a4; StartColor := $f0f0f0; EndColor := StartColor; Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<%= `<font ;6><fgcolor=0000FF><i>` + %C0 + ` ` + %C1 + ` ` + %C2 %>'; Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(13); end; end; with Columns do begin Add('C1'); (Add('C2') as EXG2ANTTLib.Column).Editor.EditType := EXG2ANTTLib.EditTypeEnum.EditType; (Add('C3') as EXG2ANTTLib.Column).Editor.EditType := EXG2ANTTLib.EditTypeEnum.EditType; with (Add('Pos') as EXG2ANTTLib.Column) do begin FormatColumn := '1 pos ``'; AllowGroupBy := False; Position := 0; Width := 48; AllowSizing := False; end; end; SortBarVisible := True; SortBarCaption := 'Drag a <b>column</b> header here to group by that column.'; AllowGroupBy := True; HasLines := EXG2ANTTLib.HierarchyLineEnum.exNoLine; LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exNoLinesAtRoot; with Items do begin h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; CellValue[TObject(h),TObject(2)] := 'SubItem A.2'; h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.3'; CellValue[TObject(h),TObject(2)] := 'SubItem A.4'; h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.5'; CellValue[TObject(h),TObject(2)] := 'SubItem A.6'; h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.7'; CellValue[TObject(h),TObject(2)] := 'SubItem A.8'; h := AddItem('Item B'); CellValue[TObject(h),TObject(1)] := 'SubItem B.1'; CellValue[TObject(h),TObject(2)] := 'SubItem B.2'; h := AddItem('Item B'); CellValue[TObject(h),TObject(1)] := 'SubItem B.3'; CellValue[TObject(h),TObject(2)] := 'SubItem B.4'; end; with Columns.Item[TObject(0)] do begin SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending; end; EndUpdate(); end |
2089 |
How can I associate a box/note to a date into the control's header
with AxG2antt1 do begin BeginUpdate(); ScrollBySingleLine := True; Columns.Add('Task'); HeaderHeight := 17; with Chart do begin FirstVisibleDate := '1/1/2001'; PaneWidth[False] := 96; LevelCount := 2; SelBackColor := AxG2antt1.SelBackColor; end; with Items do begin AddItem('Item 1'); SelectItem[AddItem('Item 2')] := True; AddItem('Item 3'); end; with Chart.Notes do begin with AxG2antt1.Items do begin LockedItemCount[EXG2ANTTLib.VAlignmentEnum.exTop] := 1; hLocked := LockedItem[EXG2ANTTLib.VAlignmentEnum.exTop,0]; ItemHeight[hLocked] := 1; end; with Add('header',TObject(hLocked),'1/7/2001','Date:<br><%dd%>/<%mm%><br><b><%yyyy%></b>') do begin PartVisible[EXG2ANTTLib.NotePartEnum.exNoteStart] := True; PartText[EXG2ANTTLib.NotePartEnum.exNoteStart] := '<b><%d%></b>'; PartCanMove[EXG2ANTTLib.NotePartEnum.exNoteEnd] := True; PartCanMove[EXG2ANTTLib.NotePartEnum.exNoteStart] := True; PartVOffset[EXG2ANTTLib.NotePartEnum.exNoteStart] := -9; PartVOffset[EXG2ANTTLib.NotePartEnum.exNoteEnd] := 20; PartHOffset[EXG2ANTTLib.NotePartEnum.exNoteEnd] := 20; PartBackColor[EXG2ANTTLib.NotePartEnum.exNoteStart] := $ffff; PartFixedWidth[EXG2ANTTLib.NotePartEnum.exNoteStart] := 18; end; end; EndUpdate(); end |
2088 |
How can I define a column of button type
// ButtonClick event - Occurs when user clicks on the cell's button. procedure TWinForm1.AxG2antt1_ButtonClick(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_ButtonClickEvent); begin with AxG2antt1 do begin with Items do begin OutputDebugString( CellValue[TObject(e.item),TObject(e.colIndex)] ); end; end end; with AxG2antt1 do begin BeginUpdate(); with (Columns.Add('Button') as EXG2ANTTLib.Column) do begin Def[EXG2ANTTLib.DefColumnEnum.exCellHasButton] := TObject(True); Def[EXG2ANTTLib.DefColumnEnum.exCellButtonAutoWidth] := TObject(False); FormatColumn := '``'; AllowSizing := False; Width := 48; end; (Columns.Add('Second') as EXG2ANTTLib.Column).FormatColumn := '` Item ` + 1 index ``'; with Items do begin AddItem('Button 1'); AddItem('Button 2'); AddItem('Button 3 '); end; EndUpdate(); end |
2087 |
Is it possible to configure different colour/icon when there is a active filter
// FilterChange event - Occurs when the filter was changed. procedure TWinForm1.AxG2antt1_FilterChange(sender: System.Object; e: System.EventArgs); begin with AxG2antt1 do begin set_Background(EXG2ANTTLib.BackgroundPartEnum.exHeaderFilterBarButton,FormatABC('value = 0 ? 0x1000001 : 0x10000FF ',TObject(Columns.Item[TObject(0)].FilterType),Nil,Nil)); end end; with AxG2antt1 do begin BeginUpdate(); with VisualAppearance do begin RenderType := -16777216; Add(1,'gBFLBCJwBAEHhEJAAEhABXUIQAAYAQGKIcBiAKBQAGYBIJDEMgzDDAUBjKKocQTC4AIQjCK4JDKHYJRpHEZyCA8EhqGASRAFUQBYiWE4oSpLABQaK0ZwIGyRIrkGQgQg' + 'mPYDSDNU4zVIEEglBI0TDNczhNDENgtGYaJqHIYpZBcM40TKkEZoSIITZcRrOEBiRL1S0RBhGcRUHZlWzdN64LhuK47UrWdD/XhdVzXRbjfz1Oq+bxve48Br7A5yYThd' + 'r4LhOFQ3RjIL4xbIcUwGe6VZhjOLZXjmO49T69HTtOCYBEBA'); end; DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines; ShowFocusRect := False; set_Background(EXG2ANTTLib.BackgroundPartEnum.exHeaderFilterBarButton,$1000001); set_Background(EXG2ANTTLib.BackgroundPartEnum.exCursorHoverColumn,$ffffffff); HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched; BackColorHeader := Color.FromArgb(255,255,255); HeaderVisible := EXG2ANTTLib.HeaderVisibleEnum.exHeaderVisibleExtendLevels; with (Columns.Add('Filter') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; AllowSort := False; AllowDragging := False; FilterList := EXG2ANTTLib.FilterListEnum.exShowCheckBox; end; with Items do begin AddItem('Item A'); AddItem('Item B'); AddItem('Item C'); end; with Columns.Item[TObject(0)] do begin Filter := 'Item B'; FilterType := EXG2ANTTLib.FilterTypeEnum.exFilter; end; ApplyFilter(); EndUpdate(); end |
2086 |
ADODB Requery sample
// ButtonClick event - Occurs when user clicks on the cell's button. procedure TWinForm1.AxG2antt1_ButtonClick(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_ButtonClickEvent); begin with AxG2antt1 do begin cmd := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADODB.Command')) as ADODB.Command); with cmd do begin ActiveConnection := ((AxG2antt1.DataSource as ADODB.Recordset).ActiveConnection as ADODB.Connection); CommandText := 'INSERT INTO Orders (EmployeeID) VALUES(12345)'; CommandType := 1; Execute(Nil,Nil,Nil); end; (DataSource as ADODB.Recordset).Requery(Nil); end end; // Error event - Fired when an internal error occurs. procedure TWinForm1.AxG2antt1_Error(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_ErrorEvent); begin with AxG2antt1 do begin OutputDebugString( e.description ); end end; with AxG2antt1 do begin BeginUpdate(); HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched; ColumnAutoResize := False; rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADODB.Recordset')) as ADODB.Recordset); with rs do begin Open('Select * From Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',1,3,Nil); end; DataSource := (rs as ADODB.Recordset); ConditionalFormats.Add('%1=12345',Nil).BackColor := $f0f0f0; with Items do begin LockedItemCount[EXG2ANTTLib.VAlignmentEnum.exTop] := 1; h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exTop,0]; ItemDivider[h] := 0; CellHasButton[TObject(h),TObject(0)] := True; CellValue[TObject(h),TObject(0)] := 'Requery (add a new record, using ADODB.Command)'; CellHAlignment[TObject(h),TObject(0)] := EXG2ANTTLib.AlignmentEnum.CenterAlignment; end; EndUpdate(); end |
2085 |
I am skinning the control's header-bar, but the background of the header-bar is shown on each item in the filter-bar drop down panel. What can I do
with AxG2antt1 do begin BeginUpdate(); with VisualAppearance do begin Add(1,'gBFLBCJwBAEHhEJAAEhABFgDg6AADACAxRDgMQBQKAAzQFAYcBqGqGAAGQZxYgmFgAQhFcZQSKUOQTDKMIziYBYfgkMIgSbJUgDGAkRRdDSOYDmGQYDiCIoRShOMIjHL' + 'UXxtDaIZwhEAoJb+RgAUY/cTzaAEUwHHiTKInaCQGhsCYJUJAdRURQ9EwvCIZBpEWwLChENQwWLCNj2TScBwjCyqbale45ViqdoDU8lORLUi+M4zSBPcZVTRtGShPDBK' + 'TjMKKYgkG4lVpRNa0PC1GTzQ6mazkKQLRADDIDVbAeL3LiMBy9LyLLItQALByua5mWhbcZyBCOPgBTrRb5zO58FjuTK7YLjMB7NrUNYtFaUMy2OpOCADIaecTNcaWLxP' + 'F2MY1HWYxVj2Jw3DuRJonKYBgggSRAlIYw6B0ThGFgPAkFUDAhBMfZRiGNAkFECZnm4YQdneJwqnsSQrGAAhWAIJBJBIQgFCQIBiEIAglgqYo0i4V4MEgRI9gSToYFSb' + '4Fk6Y4+BmBZhFOJgTC8TBogQAArgqco4muCZOkOMJtgmYpIjYKg7GKE4uCUK4AAKKg2DwI4DiCZw5k6KJ2D6D4OHiag4DwIxiiQAArAqMosnEPBPAOIhOg+DozjIJ4PG' + 'SY4iEwPAkhKLhHUUSQsnKFCnkYU9MjORhcCsAAIACLQ8iaSJ6FKC5jJoaobA8KYoACCRKnmMJzhuDpZnSboMCKGJ4nMPIPDmYAACwKIDk6CoLCeU40m6I5oliMoKDyaI' + 'CokLIpgoThviOKJoGYf4KmUKhMjMLJLCAAojCyaYoiYGoGmqM46CkOwPEoKonAACxKlSdItmiWBeBeDgrioNo3D0KxSlAAAtgsUpYnUPRPEoco8hCa+T40SxbBRj5tEs' + 'HJ1i6JhbGYS4ug8awelQLZAAKZI5C4DxrhYQ9ehmUppWiA48nAPRuFKYpiAAC47laZQ9iuKZSgOPotkuFI7C6C4gACPJAm8eQOhOQZoikDp3kCS5AACPoEk8fBGnqQgp' + 'DOSppD2TxjlyPZD6CfwekQTx5lKP5ImseZTCAL5MAMAAAkoTADmMLpIjISp+HSS4PgyMAADBzAHDSIoPCOUpWjObIKE8NJOHKIwPEaTprBsHpdjWLB9AieQ+DQYwQAAM' + 'R1EOZxWi+bx7HcWQ8msfRYnnDhQACRwxgwc5rGaMZPE0ZxqjWNZtgyRwAAyTZEnuXJzEyAx2kQcxNkye5cEy3cYAcANrGAIH4OAhx3gNGGPAfgIR8jBA4McBMARViHH4' + 'HQOYmxuCpF2MsecEQVBvGQCcIQvA6i2CAAIARAQ='); Add(2,'gBFLBCJwBAEHhEJAAEhABZEGACAADACAxRDgMQBQKAAzQFAYcBqGqGAAGQZxYgmFgAQhFcZQSKUOQTDKMIziYBYJhEMwwDhEIwjHCEEhsGIbJAGQBJCjWGodQLOEgzNC' + '0IxNFCQILhEZJADKII8TTOU5UPRESwTE4cKBmKhQCo2NpKR7VUTxCKQahLLivoCjBT8EzHMqtIzrCA6MpaP4pQjKcqwHJ8YyHEi0ZrjazKaj6T5AXDUcaWbbNVx3PK3a' + 'ioOpLZrqOZZYzYFoABTuJzPMSyIhxXD8cweaZvSpLExVYK9BY3PbKMgxC77QgTIpDaQMNS6PjtF43PAALLFUaNYzoOKzABMHATBIXAYJCwIIR5G7ID4BbQcCQAHL9DBa' + 'EEIAEEISgGhMGZQmocgymmIRQkIEQ2BcGgbEIRQci8XaMBqTRVgSAZHG+S5pnOep+D6f4vjec5zn0fpfmgBgAH6TRoBYBoAh+eAmAiAgPFgNArgOQpIESdoEmCOAOAqB' + 'YfFGAgaEaBgYHYFYFmIB5UiGCJUgKCgmgeYoHk4BgCmKRQiCwApgHgYgyH8B54lQU4NkMeJlBoDgjkiXBTg0R54iYIR+koeQVBoKpkgkChKhEJBkF4SFEjkDgJhFQoeE' + 'mDJlBeehUhWJQJGIXoICWOQ6FeFIlhkfhlDsSJpiQVoamaSY2G6G5nAmRhpCOH5pkwVYdmeCZmHqHpnkmdhzhmaAIFiax8AABAEICA=='); end; (GetOcx() as EXG2ANTTLib.G2antt).BackColorHeader := $1000000; ForeColorHeader := Color.FromArgb(128,128,128); set_Background(EXG2ANTTLib.BackgroundPartEnum.exHeaderFilterBarButton,$2000000); set_Background(EXG2ANTTLib.BackgroundPartEnum.exBackColorFilter,$ffffff); set_Background(EXG2ANTTLib.BackgroundPartEnum.exForeColorFilter,$10000); set_Background(EXG2ANTTLib.BackgroundPartEnum.exSelBackColorFilter,$1ff8000); set_Background(EXG2ANTTLib.BackgroundPartEnum.exSelForeColorFilter,$f0f0f0); set_Background(EXG2ANTTLib.BackgroundPartEnum.exCursorHoverColumn,$ffffffff); HeaderHeight := 24; BackColorLevelHeader := BackColor; with (Columns.Add('Filter') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; DisplayFilterPattern := False; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsAsc); Def[EXG2ANTTLib.DefColumnEnum.exHeaderPaddingLeft] := TObject(2); Def[EXG2ANTTLib.DefColumnEnum.exHeaderPaddingRight] := TObject(2); end; with Items do begin AddItem('A'); AddItem('B'); AddItem('C'); AddItem('D'); end; EndUpdate(); end |
2084 |
I specify the ItemHeight for each row, but as soon as I click the chart section, the item's height is restored to default (not working). What could be the cause
with AxG2antt1 do begin BeginUpdate(); ScrollBySingleLine := True; Columns.Add('Types'); DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines; with Chart do begin LevelCount := 2; DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines; AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exCreateBarAuto; AllowLinkBars := False; ResizeUnitScale := EXG2ANTTLib.UnitEnum.exHour; PaneWidth[False] := 112; FirstVisibleDate := '1/1/2001'; with Bars.Item['Task'] do begin OverlaidType := EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<%=%9%>'; Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18); end; end; with Items do begin h := AddItem('ItemMinHeight'); AddBar(h,'Task','1/7/2001','1/10/2001','A1',Nil); AddBar(h,'Task','1/8/2001','1/12/2001','A2',Nil); ItemMinHeight[h] := 64; AddBar(AddItem('Default (One)'),'Task','1/7/2001','1/10/2001','A3',Nil); h := AddItem('Default (Two)'); AddBar(h,'Task','1/7/2001','1/10/2001','A4',Nil); AddBar(h,'Task','1/8/2001','1/12/2001','A5',Nil); h := AddItem('ItemFixedHeight'); AddBar(h,'Task','1/7/2001','1/10/2001','A6',Nil); AddBar(h,'Task','1/8/2001','1/12/2001','A7',Nil); ItemMinHeight[h] := 20; ItemMaxHeight[h] := 20; h := AddItem('ItemMaxHeight'); AddBar(h,'Task','1/7/2001','1/10/2001','A8',Nil); AddBar(h,'Task','1/8/2001','1/12/2001','A9',Nil); ItemMaxHeight[h] := 24; end; EndUpdate(); end |
2083 |
The ItemHeight property is not working (method 2)
with AxG2antt1 do begin BeginUpdate(); ColumnAutoResize := False; ScrollBySingleLine := True; (Columns.Add('Column') as EXG2ANTTLib.Column).Width := 128; with Items do begin CellSingleLine[TObject(AddItem('This is a bit of text that should break the line')),TObject(0)] := EXG2ANTTLib.CellSingleLineEnum.exCaptionWordWrap; h := AddItem(''); ItemDivider[h] := 0; SelectableItem[h] := False; ItemDividerLineAlignment[h] := EXG2ANTTLib.DividerAlignmentEnum.DividerCenter; ItemHeight[h] := 3; CellSingleLine[TObject(AddItem('This is a bit of text that should break the line')),TObject(0)] := EXG2ANTTLib.CellSingleLineEnum.exCaptionWordWrap; end; EndUpdate(); end |
2082 |
The ItemHeight property is not working (method 1)
with AxG2antt1 do begin BeginUpdate(); ColumnAutoResize := False; ScrollBySingleLine := True; with (Columns.Add('Column') as EXG2ANTTLib.Column) do begin Width := 128; Def[EXG2ANTTLib.DefColumnEnum.exCellSingleLine] := TObject(0); end; with Items do begin AddItem('This is a bit of text that should break the line'); h := AddItem(''); ItemDivider[h] := 0; SelectableItem[h] := False; ItemDividerLineAlignment[h] := EXG2ANTTLib.DividerAlignmentEnum.DividerCenter; ItemMinHeight[h] := 3; ItemMaxHeight[h] := 3; AddItem('This is a bit of text that should break the line'); end; EndUpdate(); end |
2081 |
How do I use the ColumnsFloatBarVisible on exColumnsFloatBarVisibleIncludeCheckColumns
with AxG2antt1 do begin BeginUpdate(); ColumnAutoResize := False; HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched; with Columns do begin Add('City'); (Add('Start') as EXG2ANTTLib.Column).Visible := False; (Add('End') as EXG2ANTTLib.Column).Visible := False; end; set_Description(EXG2ANTTLib.DescriptionTypeEnum.exColumnsFloatBar,'Show/Hide'); ColumnsFloatBarSortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending; ColumnsFloatBarVisible := EXG2ANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeCheckColumns; EndUpdate(); end |
2080 |
How do I use the ColumnsFloatBarVisible on exColumnsFloatBarVisibleIncludeHiddenColumn
with AxG2antt1 do begin BeginUpdate(); ColumnAutoResize := False; HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched; with Columns do begin Add('City'); (Add('Start') as EXG2ANTTLib.Column).Visible := False; (Add('End') as EXG2ANTTLib.Column).Visible := False; end; set_Description(EXG2ANTTLib.DescriptionTypeEnum.exColumnsFloatBar,'Show'); ColumnsFloatBarVisible := EXG2ANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeHiddenColumns; ColumnsFloatBarSortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending; EndUpdate(); end |
2079 |
How do I use the ColumnsFloatBarVisible on exColumnsFloatBarVisibleIncludeGroupByColumns
with AxG2antt1 do begin BeginUpdate(); ColumnAutoResize := False; HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched; with Columns do begin Add('City'); Add('Start'); Add('End'); end; AllowGroupBy := True; SortBarVisible := True; SortBarCaption := 'Drag a <b>column</b> header here to group by that column.'; BackColorSortBar := Color.FromArgb(250,250,250); set_Description(EXG2ANTTLib.DescriptionTypeEnum.exColumnsFloatBar,'Group-By'); ColumnsFloatBarVisible := EXG2ANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeGroupByColumns; ColumnsFloatBarSortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending; Columns.Item['City'].SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending; EndUpdate(); end |
2078 |
How can I advance to the next line, once the user presses the ENTER key
// KeyDown event - Occurs when the user presses a key while an object has the focus. procedure TWinForm1.AxG2antt1_KeyDownEvent(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_KeyDownEvent); begin with AxG2antt1 do begin OutputDebugString( 'KeyCode Before:' ); OutputDebugString( e.keyCode ); e.keyCode := FormatABC('value = 13 ? 40 : value',TObject(e.keyCode),Nil,Nil); OutputDebugString( 'KeyCode After:' ); OutputDebugString( e.keyCode ); end end; with AxG2antt1 do begin BeginUpdate(); with Columns do begin with (Add('A') as EXG2ANTTLib.Column).Editor do begin Appearance := EXG2ANTTLib.InplaceAppearanceEnum.EtchedApp; EditType := EXG2ANTTLib.EditTypeEnum.EditType; end; with (Add('B') as EXG2ANTTLib.Column).Editor do begin Appearance := EXG2ANTTLib.InplaceAppearanceEnum.EtchedApp; EditType := EXG2ANTTLib.EditTypeEnum.EditType; end; end; with Items do begin h0 := AddItem('Item A.1'); CellValue[TObject(h0),TObject(1)] := 'Item B.1'; h0 := AddItem('Item A.2'); CellValue[TObject(h0),TObject(1)] := 'Item B.2'; end; EndUpdate(); end |
2077 |
I am using AddNew to add new records, but I can not see them into the control
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin with Items do begin AddBar(e.item,'Task',CellValue[TObject(e.item),TObject(1)],CellValue[TObject(e.item),TObject(2)],Nil,Nil); end; end end; // ButtonClick event - Occurs when user clicks on the cell's button. procedure TWinForm1.AxG2antt1_ButtonClick(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_ButtonClickEvent); begin with AxG2antt1 do begin with (DataSource as ADODB.Recordset) do begin AddNew(Nil,Nil); Fields.Item['Name'].Value := 'Task New'; Update(Nil,Nil); end; end end; with AxG2antt1 do begin BeginUpdate(); HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched; rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADODB.Recordset')) as ADODB.Recordset); with rs do begin with Fields do begin Append('Name',8,Nil,Nil,Nil); Append('Start',7,Nil,Nil,Nil); Append('End',7,Nil,Nil,Nil); end; Open(Nil,Nil,Nil,Nil,Nil); AddNew(Nil,Nil); Fields.Item['Name'].Value := 'Task A'; Fields.Item['Start'].Value := '1/4/2001'; Fields.Item['End'].Value := '1/10/2001'; Update(Nil,Nil); AddNew(Nil,Nil); Fields.Item['Name'].Value := 'Task B'; Fields.Item['Start'].Value := '1/5/2001'; Fields.Item['End'].Value := '1/11/2001'; Update(Nil,Nil); end; DataSource := (rs as ADODB.Recordset); with Chart do begin FirstVisibleDate := '1/1/2001'; LevelCount := 2; PaneWidth[False] := 256; end; Items.AllowCellValueToItemBar := True; Columns.Item['Start'].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1); Columns.Item['End'].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2); with Items do begin LockedItemCount[EXG2ANTTLib.VAlignmentEnum.exTop] := 1; h := LockedItem[EXG2ANTTLib.VAlignmentEnum.exTop,0]; ItemDivider[h] := 0; CellHasButton[TObject(h),TObject(0)] := True; CellValue[TObject(h),TObject(0)] := 'AddNew'; CellHAlignment[TObject(h),TObject(0)] := EXG2ANTTLib.AlignmentEnum.CenterAlignment; end; DetectAddNew := True; DetectDelete := True; EndUpdate(); end |
2076 |
How can I create a new ADO recordset
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin with Items do begin AddBar(e.item,'Task',CellValue[TObject(e.item),TObject(1)],CellValue[TObject(e.item),TObject(2)],Nil,Nil); end; end end; with AxG2antt1 do begin BeginUpdate(); rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADODB.Recordset')) as ADODB.Recordset); with rs do begin with Fields do begin Append('Name',8,Nil,Nil,Nil); Append('Start',7,Nil,Nil,Nil); Append('End',7,Nil,Nil,Nil); end; Open(Nil,Nil,Nil,Nil,Nil); AddNew(Nil,Nil); Fields := 'Task A'; Fields := '1/4/2001'; Fields := '1/10/2001'; Update(Nil,Nil); AddNew(Nil,Nil); Fields := 'Task B'; Fields := '1/5/2001'; Fields := '1/11/2001'; Update(Nil,Nil); end; DataSource := (rs as ADODB.Recordset); with Chart do begin FirstVisibleDate := '1/1/2001'; LevelCount := 2; PaneWidth[False] := 256; end; Items.AllowCellValueToItemBar := True; Columns.Item['Start'].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1); Columns.Item['End'].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2); EndUpdate(); end |
2075 |
Do do I get the DAO version I have installed
with AxG2antt1 do begin OutputDebugString( (ComObj.CreateComObject(ComObj.ProgIDToClassID('DAO.DBEngine.35')) as DAO.PrivDBEngine).Version ); OutputDebugString( (ComObj.CreateComObject(ComObj.ProgIDToClassID('DAO.DBEngine.36')) as DAO.PrivDBEngine).Version ); OutputDebugString( (ComObj.CreateComObject(ComObj.ProgIDToClassID('DAO.DBEngine.120')) as DAO.PrivDBEngine).Version ); end |
2074 |
How do I get a list of interfaces the object implemenets
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin with Items do begin AddBar(e.item,'Task',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil); end; end end; with AxG2antt1 do begin BeginUpdate(); ColumnAutoResize := False; with (ComObj.CreateComObject(ComObj.ProgIDToClassID('DAO.DBEngine.120')) as DAO.PrivDBEngine) do begin rs := (OpenDatabase('C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',Nil,Nil,Nil).OpenRecordset('Orders',Nil,Nil,Nil) as DAO.Recordset2); end; OutputDebugString( (ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.PropertiesList')) as Object) ); DataSource := (rs as DAO.Recordset2); with Chart do begin FirstVisibleDate := '8/4/1994'; LevelCount := 2; PaneWidth[False] := 256; end; Items.AllowCellValueToItemBar := True; Columns.Item[TObject(2)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1); Columns.Item[TObject(4)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2); EndUpdate(); end |
2073 |
Do do I get the ADO version I have installed
|
2072 |
DAO, ACCDB, 120
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin with Items do begin AddBar(e.item,'Task',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil); end; end end; with AxG2antt1 do begin BeginUpdate(); ColumnAutoResize := False; with (ComObj.CreateComObject(ComObj.ProgIDToClassID('DAO.DBEngine.120')) as DAO.PrivDBEngine) do begin rs := (OpenDatabase('C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',Nil,Nil,Nil).OpenRecordset('Orders',Nil,Nil,Nil) as DAO.Recordset2); end; DataSource := (rs as DAO.Recordset2); with Chart do begin FirstVisibleDate := '8/4/1994'; LevelCount := 2; PaneWidth[False] := 256; end; Items.AllowCellValueToItemBar := True; Columns.Item[TObject(2)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1); Columns.Item[TObject(4)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2); EndUpdate(); end |
2071 |
DAO, MDB, 120
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin with Items do begin AddBar(e.item,'Task',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil); end; end end; with AxG2antt1 do begin BeginUpdate(); ColumnAutoResize := False; with (ComObj.CreateComObject(ComObj.ProgIDToClassID('DAO.DBEngine.120')) as DAO.PrivDBEngine) do begin rs := (OpenDatabase('C:\Program Files\Exontrol\ExG2antt\sample\Access\misc.mdb',Nil,Nil,Nil).OpenRecordset('Orders',Nil,Nil,Nil) as DAO.Recordset2); end; DataSource := (rs as DAO.Recordset2); with Chart do begin FirstVisibleDate := '8/4/1994'; LevelCount := 2; PaneWidth[False] := 256; end; Items.AllowCellValueToItemBar := True; Columns.Item[TObject(2)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1); Columns.Item[TObject(4)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2); EndUpdate(); end |
2070 |
DAO, MDB
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin with Items do begin AddBar(e.item,'Task',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil); end; end end; with AxG2antt1 do begin BeginUpdate(); ColumnAutoResize := False; with (ComObj.CreateComObject(ComObj.ProgIDToClassID('DAO.DBEngine.36')) as DAO.PrivDBEngine) do begin rs := OpenDatabase('C:\Program Files\Exontrol\ExG2antt\sample\Access\misc.mdb',Nil,Nil,Nil).OpenRecordset('Orders',Nil,Nil,Nil); end; DataSource := (rs as DAO.Recordset); with Chart do begin FirstVisibleDate := '8/4/1994'; LevelCount := 2; PaneWidth[False] := 256; end; Items.AllowCellValueToItemBar := True; Columns.Item[TObject(2)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1); Columns.Item[TObject(4)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2); EndUpdate(); end |
2069 |
ADODB, ACCDB, x64
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin with Items do begin AddBar(e.item,'Task',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil); end; end end; with AxG2antt1 do begin BeginUpdate(); ColumnAutoResize := False; rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADODB.Recordset')) as ADODB.Recordset); with rs do begin Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',1,1,Nil); end; DataSource := (rs as ADODB.Recordset); with Chart do begin FirstVisibleDate := '8/4/1994'; LevelCount := 2; PaneWidth[False] := 256; end; Items.AllowCellValueToItemBar := True; Columns.Item[TObject(2)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1); Columns.Item[TObject(4)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2); EndUpdate(); end |
2068 |
ADOR, ACCDB
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin with Items do begin AddBar(e.item,'Task',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil); end; end end; with AxG2antt1 do begin BeginUpdate(); ColumnAutoResize := False; rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset); with rs do begin Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',3,3,Nil); end; DataSource := (rs as ADODB.Recordset); with Chart do begin FirstVisibleDate := '8/4/1994'; LevelCount := 2; PaneWidth[False] := 256; end; Items.AllowCellValueToItemBar := True; Columns.Item[TObject(2)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1); Columns.Item[TObject(4)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2); EndUpdate(); end |
2067 |
ADODB, MDB
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin with Items do begin AddBar(e.item,'Task',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil); end; end end; with AxG2antt1 do begin BeginUpdate(); ColumnAutoResize := False; rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADODB.Recordset')) as ADODB.Recordset); with rs do begin Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',3,3,Nil); end; DataSource := (rs as ADODB.Recordset); with Chart do begin FirstVisibleDate := '8/4/1994'; LevelCount := 2; PaneWidth[False] := 256; end; Items.AllowCellValueToItemBar := True; Columns.Item[TObject(2)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1); Columns.Item[TObject(4)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2); EndUpdate(); end |
2066 |
ADOR, MDB
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin with Items do begin AddBar(e.item,'Task',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil); end; end end; with AxG2antt1 do begin BeginUpdate(); ColumnAutoResize := False; rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADOR.Recordset')) as ADODB.Recordset); with rs do begin Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb',3,3,Nil); end; DataSource := (rs as ADODB.Recordset); with Chart do begin FirstVisibleDate := '8/4/1994'; LevelCount := 2; PaneWidth[False] := 256; end; Items.AllowCellValueToItemBar := True; Columns.Item[TObject(2)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1); Columns.Item[TObject(4)].Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2); EndUpdate(); end |
2065 |
I am using exCellValueToItemBarProperty, Is it possible to “disable” this synchronisation for one (or several) item (sample-2)
with AxG2antt1 do begin BeginUpdate(); with Columns do begin Add('Tasks'); (Add('Start') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1); (Add('End') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2); end; with Chart do begin FirstVisibleDate := '9/20/2006'; LevelCount := 2; PaneWidth[False] := 196; AllowCreateBar := EXG2ANTTLib.CreateBarEnum.exCreateBarAuto; end; with Items do begin AllowCellValueToItemBar := True; AddBar(AddItem('Task 1'),'Task','9/21/2006','9/24/2006',Nil,Nil); h := AddItem('Task 2'); AddBar(h,'Task','9/22/2006','9/25/2006',Nil,Nil); ItemBold[h] := True; CellValueToItemBar(TObject(h),TObject(1),EXG2ANTTLib.ItemBarPropertyEnum.exBarStart,'newbar'); CellValueToItemBar(TObject(h),TObject(2),EXG2ANTTLib.ItemBarPropertyEnum.exBarEnd,'newbar'); AddBar(AddItem('Task 3'),'Task','9/23/2006','9/26/2006',Nil,Nil); end; EndUpdate(); end |
2064 |
I am using exCellValueToItemBarProperty, Is it possible to “disable” this synchronisation for one (or several) item (sample-1)
with AxG2antt1 do begin BeginUpdate(); with Columns do begin Add('Tasks'); (Add('Start') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1); (Add('End') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2); end; with Chart do begin FirstVisibleDate := '9/20/2006'; LevelCount := 2; PaneWidth[False] := 196; end; with Items do begin AllowCellValueToItemBar := True; AddBar(AddItem('Task 1'),'Task','9/21/2006','9/24/2006',Nil,Nil); h := AddItem('Task 2'); AddBar(h,'Task','9/22/2006','9/25/2006',Nil,Nil); FormatCell[TObject(h),TObject(1)] := '``'; FormatCell[TObject(h),TObject(2)] := '``'; ItemBold[h] := True; AddBar(AddItem('Task 3'),'Task','9/23/2006','9/26/2006',Nil,Nil); end; EndUpdate(); end |
2063 |
How can I use the CRD (eXCRD format)
with AxG2antt1 do begin BeginUpdate(); HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched; SelBackMode := EXG2ANTTLib.BackModeEnum.exTransparent; with (Columns.Add('Default') as EXG2ANTTLib.Column) do begin Def[EXG2ANTTLib.DefColumnEnum.exCellFormatLevel] := '[b=0]60;1[b=15]:60,((20;"<fgcolor=808080>Dateigröße"[b=1][a=2]:120,2[b=15])/(20;"<fgcolor=808080>Erstellt am"[a=2]:120,3[b=15])/' + '(20;"<fgcolor=808080>Zuletzt bearbeitet"[b=4][a=2]:120,4[b=15]))'; AllowSort := False; end; (Columns.Add(1) as EXG2ANTTLib.Column).Visible := False; with (Columns.Add(2) as EXG2ANTTLib.Column) do begin Visible := False; Editor.EditType := EXG2ANTTLib.EditTypeEnum.EditType; FormatColumn := '1 index `A-Z`'; end; with (Columns.Add(3) as EXG2ANTTLib.Column) do begin Visible := False; Editor.EditType := EXG2ANTTLib.EditTypeEnum.EditType; FormatColumn := '1 index ``'; end; with (Columns.Add(4) as EXG2ANTTLib.Column) do begin Visible := False; Editor.EditType := EXG2ANTTLib.EditTypeEnum.EditType; FormatColumn := 'date(``)'; end; dih := 48; DefaultItemHeight := dih; DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines; GridLineStyle := EXG2ANTTLib.GridLinesStyleEnum.exGridLinesSolid; with Chart do begin DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines; GridLineStyle := EXG2ANTTLib.GridLinesStyleEnum.exGridLinesSolid; PaneWidth[False] := 256; LevelCount := 2; FirstVisibleDate := '1/1/2001'; Bars.Item['Task'].OverlaidType := Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange) Or Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack); end; with Items do begin h := AddItem(''); CellValue[TObject(h),TObject(1)] := 'One'; AddBar(h,'Task','1/2/2001','1/12/2001','A',Nil); AddBar(h,'Task','1/4/2001','1/14/2001','B',Nil); ItemMaxHeight[h] := dih; h := AddItem(''); CellValue[TObject(h),TObject(1)] := 'Two'; AddBar(h,'Task','1/5/2001','1/10/2001','A',Nil); AddBar(h,'Task','1/2/2001','1/4/2001','B',Nil); AddBar(h,'Task','1/5/2001','1/14/2001','B2',Nil); ItemMaxHeight[h] := dih; h := AddItem(''); CellValue[TObject(h),TObject(1)] := 'Three'; AddBar(h,'Task','1/5/2001','1/10/2001','A',Nil); end; EndUpdate(); end |
2062 |
Type of wraps the cell's caption support (Sample 2)
with AxG2antt1 do begin BeginUpdate(); HeaderSingleLine := False; HeaderHeight := 36; DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines; ColumnAutoResize := False; ScrollBySingleLine := True; with Columns do begin with (Add('Single-Line (exCaptionSingleLine)') as EXG2ANTTLib.Column) do begin Width := 96; Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1); Def[EXG2ANTTLib.DefColumnEnum.exCellSingleLine] := TObject(-1); end; with (Add('Word-Wrap (exCaptionWordWrap)') as EXG2ANTTLib.Column) do begin Width := 96; Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1); Def[EXG2ANTTLib.DefColumnEnum.exCellSingleLine] := TObject(0); FormatColumn := '%0'; end; with (Add('Break-Wrap (exCaptionBreakWrap)') as EXG2ANTTLib.Column) do begin Width := 96; Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1); Def[EXG2ANTTLib.DefColumnEnum.exCellSingleLine] := TObject(1); FormatColumn := '%0'; end; end; with Items do begin AddItem('This is the <b>first</b> line.<br>This is the <b>second</b> line.<br>This is the <b>third</b> line.'); AddItem('This is the <b>first</b> line.\r\nThis is the <b>second</b> line.\r\nThis is the <b>third</b> line.'); end; EndUpdate(); end |
2061 |
Type of wraps the cell's caption support (Sample 1)
with AxG2antt1 do begin BeginUpdate(); HeaderSingleLine := False; HeaderHeight := 36; DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines; ColumnAutoResize := False; ScrollBySingleLine := True; (Columns.Add('Default') as EXG2ANTTLib.Column).Width := 128; with Items do begin h := AddItem('This is the first line.\r\nThis is the second line.\r\nThis is the third line.'); h := AddItem('This is the <b>first</b> line.<br>This is the <b>second</b> line.<br>This is the <b>third</b> line.'); CellValueFormat[TObject(h),TObject(0)] := EXG2ANTTLib.ValueFormatEnum.exHTML; h := AddItem('This is the first line.\r\nThis is the second line.\r\nThis is the third line.'); CellSingleLine[TObject(h),TObject(0)] := EXG2ANTTLib.CellSingleLineEnum.exCaptionWordWrap; h := AddItem('This is the <b>first</b> line.<br>This is the <b>second</b> line.<br>This is the <b>third</b> line.'); CellValueFormat[TObject(h),TObject(0)] := EXG2ANTTLib.ValueFormatEnum.exHTML; CellSingleLine[TObject(h),TObject(0)] := EXG2ANTTLib.CellSingleLineEnum.exCaptionWordWrap; h := AddItem('This is the first line.\r\nThis is the second line.\r\nThis is the third line.'); CellSingleLine[TObject(h),TObject(0)] := EXG2ANTTLib.CellSingleLineEnum.exCaptionBreakWrap; h := AddItem('This is the <b>first</b> line.<br>This is the <b>second</b> line.<br>This is the <b>third</b> line.'); CellValueFormat[TObject(h),TObject(0)] := EXG2ANTTLib.ValueFormatEnum.exHTML; CellSingleLine[TObject(h),TObject(0)] := EXG2ANTTLib.CellSingleLineEnum.exCaptionBreakWrap; end; EndUpdate(); end |
2060 |
Can I break the cell's caption using the line break <br> or \r\n (Sample 2)
with AxG2antt1 do begin BeginUpdate(); DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines; ColumnAutoResize := False; ScrollBySingleLine := True; (Columns.Add('Default') as EXG2ANTTLib.Column).Width := 128; with Items do begin CellSingleLine[TObject(AddItem('This is the first line.\r\nThis is the second line.\r\nThis is the third line.')),TObject(0)] := EXG2ANTTLib.CellSingleLineEnum.exCaptionBreakWrap; AddItem('This is the first line.\r\nThis is the second line.\r\nThis is the third line.'); end; EndUpdate(); end |
2059 |
Can I break the cell's caption using the line break <br> or \r\n (Sample 1)
with AxG2antt1 do begin BeginUpdate(); DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines; ColumnAutoResize := False; ScrollBySingleLine := True; with (Columns.Add('Default') as EXG2ANTTLib.Column) do begin Width := 128; Def[EXG2ANTTLib.DefColumnEnum.exCellSingleLine] := TObject(1); end; with Items do begin AddItem('This is the first line.\r\nThis is the second line.\r\nThis is the third line.'); AddItem('This is the first line.\r\nThis is the second line.\r\nThis is the third line.'); end; EndUpdate(); end |
2058 |
The histogram is showing empty space, when expanding an item. What could be wrong
with AxG2antt1 do begin BeginUpdate(); LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exGroupLinesOutside; with Chart do begin LevelCount := 2; PaneWidth[False] := 128; FirstVisibleDate := '1/1/2001'; HistogramVisible := True; HistogramHeight := 48; HistogramView := Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramNoGrouping) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramLeafItems) Or Integer(EXG2ANTTLib.HistogramViewEnum.exHistogramAllItems); Bars.Item['Task'].HistogramPattern := EXG2ANTTLib.PatternEnum.exPatternBDiagonal; end; Columns.Add('Column'); with Items do begin h := AddItem('Project 1'); AddBar(InsertItem(h,Nil,'Item 1'),'Task','1/2/2001','1/4/2001',Nil,Nil); AddBar(InsertItem(h,Nil,'Item 2'),'Task','1/3/2001','1/5/2001',Nil,Nil); ExpandItem[h] := True; h := AddItem('Project 2'); AddBar(InsertItem(h,Nil,'Item 1'),'Task','1/7/2001','1/10/2001',Nil,Nil); AddBar(InsertItem(h,Nil,'Item 2'),'Task','1/6/2001','1/8/2001',Nil,Nil); end; EndUpdate(); end |
2057 |
How can I change the visual appearance/color of the Filter For ... field
with AxG2antt1 do begin BeginUpdate(); LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; BackColorHeader := Color.FromArgb(1,0,0); ForeColorHeader := Color.FromArgb(255,255,255); set_Background(EXG2ANTTLib.BackgroundPartEnum.exBackColorFilter,BackColorHeader); set_Background(EXG2ANTTLib.BackgroundPartEnum.exForeColorFilter,ForeColorHeader); set_Background(EXG2ANTTLib.BackgroundPartEnum.exHeaderFilterBarButton,$f0f0f0); set_Background(EXG2ANTTLib.BackgroundPartEnum.exCursorHoverColumn,$ffffffff); HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Bump; with (Columns.Add('Items') as EXG2ANTTLib.Column) do begin FilterOnType := True; DisplayFilterButton := True; FilterList := EXG2ANTTLib.FilterListEnum.exNoItems; end; with Items do begin h := AddItem('Root 1'); InsertItem(h,Nil,'Child 1'); InsertItem(h,Nil,'Child 2'); ExpandItem[h] := True; h := AddItem('Root 2'); InsertItem(h,Nil,'Child 1'); InsertItem(h,Nil,'Child 2'); end; EndUpdate(); end |
2056 |
How can I display the cell's caption without spaces on both sides
with AxG2antt1 do begin BeginUpdate(); ColumnAutoResize := True; with (Columns.Add('Default') as EXG2ANTTLib.Column) do begin Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1); FormatColumn := '((trim(value) replace ` ` with ` `) replace ` ` with ` `) replace ` ` with `<bgcolor=FF0000> </bgcolor>`'; end; with Items do begin AddItem(''); AddItem('Item A'); AddItem(' Item B'); AddItem(' Item C '); end; EndUpdate(); end |
2055 |
How can I highlight the spaces within the column (sample 2)
with AxG2antt1 do begin BeginUpdate(); ColumnAutoResize := True; with (Columns.Add('Default') as EXG2ANTTLib.Column) do begin Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1); FormatColumn := '`''` + ( value replace ` ` with `_` ) + `''`'; end; with Items do begin AddItem(''); AddItem('Item A'); AddItem(' Item B'); AddItem(' Item C '); end; EndUpdate(); end |
2054 |
How can I highlight the spaces within the column (sample 1)
with AxG2antt1 do begin BeginUpdate(); ColumnAutoResize := True; with (Columns.Add('Default') as EXG2ANTTLib.Column) do begin Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1); FormatColumn := 'len(value) = 0 ? `<bgcolor=FF0000> </bgcolor>` : ( value replace ` ` with `<bgcolor=FF0000> </bgcolor>` )'; end; with Items do begin AddItem(''); AddItem('Item A'); AddItem(' Item B'); AddItem(' Item C '); end; EndUpdate(); end |
2053 |
How can I change the visual aspect of the drop down filter-calendar
with AxG2antt1 do begin BeginUpdate(); set_Background(EXG2ANTTLib.BackgroundPartEnum.exBackColorFilter,$10000); set_Background(EXG2ANTTLib.BackgroundPartEnum.exForeColorFilter,$ffffff); set_Background(EXG2ANTTLib.BackgroundPartEnum.exDateScrollRange,$ffffff); set_Background(EXG2ANTTLib.BackgroundPartEnum.exDateHeader,get_Background(EXG2ANTTLib.BackgroundPartEnum.exBackColorFilter)); set_Background(EXG2ANTTLib.BackgroundPartEnum.exDateScrollThumb,$808080); with (Columns.Add('Date') as EXG2ANTTLib.Column) do begin FilterType := EXG2ANTTLib.FilterTypeEnum.exDate; DisplayFilterButton := True; DisplayFilterDate := True; DisplayFilterPattern := False; end; EndUpdate(); end |
2052 |
How can I scroll the chart to ensure that a bar fits the chart's client area
// ButtonClick event - Occurs when user clicks on the cell's button. procedure TWinForm1.AxG2antt1_ButtonClick(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_ButtonClickEvent); begin with AxG2antt1 do begin kBar := Items.FirstItemBar[e.item]; dStart := Items.ItemBar[e.item,TObject(kBar),EXG2ANTTLib.ItemBarPropertyEnum.exBarStart]; dEnd := Items.ItemBar[e.item,TObject(kBar),EXG2ANTTLib.ItemBarPropertyEnum.exBarEnd]; dScroll := FormatABC('(A+B)/2',TObject(dStart),TObject(dEnd),Nil); Chart.ScrollTo(dScroll,TObject(1)); end end; with AxG2antt1 do begin BeginUpdate(); ShowFocusRect := False; DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines; GridLineStyle := EXG2ANTTLib.GridLinesStyleEnum.exGridLinesDot4; SelBackMode := EXG2ANTTLib.BackModeEnum.exTransparent; with Chart do begin OverviewVisible := Integer(EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowDateTimeScaleBottom) Or Integer(EXG2ANTTLib.OverviewVisibleEnum.exOverviewAllowVerticalScroll) Or Integer(EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible); OverviewHeight := 26; FirstVisibleDate := '6/8/2011'; AdjustLevelsToBase := True; PaneWidth[False] := 64; UnitWidth := 14; LevelCount := 2; DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines; GridLineStyle := EXG2ANTTLib.GridLinesStyleEnum.exGridLinesDot4; SelBackColor := AxG2antt1.SelBackColor; ColumnsFormatLevel := '"":2,(""/14;1/""):14'; end; with Columns do begin Add('Default'); with (Add('') as EXG2ANTTLib.Column) do begin Def[EXG2ANTTLib.DefColumnEnum.exCellHasButton] := TObject(True); Def[EXG2ANTTLib.DefColumnEnum.exCellBackColor] := TObject(15790320); Visible := False; end; end; with Items do begin AddBar(AddItem('T1'),'Task','6/9/2011','6/17/2011',Nil,Nil); AddBar(AddItem('T2'),'Task','1/10/2012','1/17/2012',Nil,Nil); AddBar(AddItem('T3'),'Task','2/19/2013','2/23/2013',Nil,Nil); AddBar(AddItem('T4'),'Task','12/19/2014','12/23/2014',Nil,Nil); end; EndUpdate(); end |
2051 |
Is it possible to hide completely the list portion
with AxG2antt1 do begin BeginUpdate(); HeaderHeight := 32; OnResizeControl := Integer(EXG2ANTTLib.OnResizeControlEnum.exDisableSplitter) Or Integer(EXG2ANTTLib.OnResizeControlEnum.exResizeChart); DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines; with ConditionalFormats.Add('%CS0 = 1',Nil) do begin ApplyToBars := 'Task'; BarColor := $ff; end; with Chart do begin FirstVisibleDate := '6/8/2011'; AdjustLevelsToBase := True; PaneWidth[False] := 0; LevelCount := 2; AllowInsideZoom := True; with Level[0] do begin Alignment := EXG2ANTTLib.AlignmentEnum.CenterAlignment; Label := '<b><%d%>-<%mmm%>-<%yyyy%>'; Unit := EXG2ANTTLib.UnitEnum.exDay; end; with Level[1] do begin Label := '<%h%>'; Count := 8; Unit := EXG2ANTTLib.UnitEnum.exHour; FormatLabel := 'date(int(dvalue)) case (#06/08/2011# : (int(value) case ( 0 : ''Shift <b>1</b><br>23/20''; 8 : ''Shift <b>2</b><br>38/30'' ; 16 : ''S' + 'hift <b>3</b><br>24/24'' ) ) ; #06/09/2011# : (int(value) case ( 0 : ''Shift <b>1</b><br>15/20''; 8 : ''Shift <b>2</b><br>30/32'' ; 1' + '6 : ''Shift <b>3</b><br>26/24'' ) ) )'; end; UnitWidth := 64; NonworkingDays := 0; ColumnsFormatLevel := '0'; AllowInsideZoom := True; DefaultInsideZoomFormat.InsideUnit := EXG2ANTTLib.UnitEnum.exMinute; AllowResizeInsideZoom := False; InsideZoomOnDblClick := False; with InsideZooms do begin SplitBaseLevel := False; DefaultWidth := 0; end; with InsideZooms do begin Add('6/9/2011 8:00:00 AM'); Add('6/9/2011 4:00:00 PM'); end; DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines; GridLineStyle := EXG2ANTTLib.GridLinesStyleEnum.exGridLinesDot4; end; (Columns.Add('Defaul') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True); with Items do begin AddBar(AddItem('T1'),'Task','6/8/2011 8:00:00 AM','6/10/2011',Nil,Nil); AddBar(AddItem('T2'),'Task','6/8/2011 4:00:00 PM','6/10/2011 8:00:00 AM',Nil,Nil); AddBar(AddItem('T3'),'Task','6/9/2011','6/10/2011',Nil,Nil); CellState[TObject(ItemByIndex[1]),TObject(0)] := 1; end; EndUpdate(); end |
2050 |
How can I find out what exBarWorkingCount represents
with AxG2antt1 do begin BeginUpdate(); with (Columns.Add('Tasks') as EXG2ANTTLib.Column) do begin AllowSizing := False; Width := 42; end; with (Columns.Add('Format') as EXG2ANTTLib.Column) do begin Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(258); FormatColumn := 'trim((1:=int((0:=value)/365) ? =:1 + ` year(s) ` : ``) + (1:=int((0:=(=:0 - (=:1*365)))/31) ? =:1 + ` month(s) ` : ``) + (1:=in' + 't((0:=(=:0 - (=:1*31)))/7) ? =:1 + ` week(s) ` : ``) + (1:=int((0:=(=:0 - (=:1*7)))/1) ? =:1 + ` day(s) ` : ``) + (1:=int((0:=(=' + ':0 - =:1 + 1/24/60/60/2))*24) ? =:1 + ` hour(s) ` : ``) + (1:=int((0:=(=:0*24 - =:1))*60) ? =:1 + ` min(s) ` : ``) + (1:=int((0:' + '=(=:0*60 - =:1))*60) ? =:1 + ` sec(s)` : ``))'; end; with (Columns.Add('Value') as EXG2ANTTLib.Column) do begin Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(258); SortType := EXG2ANTTLib.SortTypeEnum.SortNumeric; Editor.EditType := EXG2ANTTLib.EditTypeEnum.EditType; end; HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched; DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines; GridLineStyle := EXG2ANTTLib.GridLinesStyleEnum.exGridLinesSolid; SelBackColor := Color.FromArgb(204,232,255); SelForeColor := Color.FromArgb(0,0,0); with Chart do begin SelBackColor := AxG2antt1.SelBackColor; FirstVisibleDate := '4/6/2009'; PaneWidth[False] := 256; LevelCount := 2; UnitScale := EXG2ANTTLib.UnitEnum.exHour; NonworkingHours := 15728767; ShowNonworkingDates := False; ShowNonworkingUnits := False; ShowNonworkingHours := False; with Bars.Item['Task'] do begin Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount] := TObject(True); end; AllowLinkBars := False; DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines; GridLineStyle := EXG2ANTTLib.GridLinesStyleEnum.exGridLinesSolid; Level[0].DrawGridLines := True; ResizeUnitScale := EXG2ANTTLib.UnitEnum.exMinute; ResizeUnitCount := 15; Label[EXG2ANTTLib.UnitEnum.exMinute] := '<|><%nn%><|><%h%>:<%nn%> <%AM/PM%><|><%d3%>, <%m3%> <%d%>, ''<%yy%> <%h%>:<%nn%> <%AM/PM%><|><%dddd%>, <%mmmm%> <%d%>, <%yyyy%> <' + '%h%>:<%nn%> <%AM/PM%><||>15'; AllowZoomOnFly := Integer(EXG2ANTTLib.ZoomOnFlyEnum.exZoomOnFlyIncludeNeighborItems) Or Integer(EXG2ANTTLib.ZoomOnFlyEnum.exZoomOnFly); BackColorZoomOnFly := $ffff; end; Items.AllowCellValueToItemBar := True; with Items do begin h := AddItem(''); SelectableItem[h] := False; SortableItem[h] := False; AddBar(AddItem('T1'),'Task','4/6/2009 10:00:00 AM','4/6/2009 1:00:00 PM',Nil,Nil); AddBar(AddItem('T2'),'Task','4/6/2009 10:00:00 AM','4/6/2009 4:00:00 PM',Nil,Nil); AddBar(AddItem('T3'),'Task','4/6/2009 10:00:00 AM','4/6/2009 7:00:00 PM',Nil,Nil); h := AddItem(''); SelectableItem[h] := False; SortableItem[h] := False; end; EndUpdate(); end |
2049 |
How can I hide the filter bar description
with AxG2antt1 do begin BeginUpdate(); with (Columns.Add('Filter') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterType := EXG2ANTTLib.FilterTypeEnum.exFilter; Filter := 'B'; end; with Items do begin AddItem('A'); AddItem('B'); AddItem('C'); end; ApplyFilter(); FilterBarHeight := 0; EndUpdate(); end |
2048 |
How can I add a break bar
with AxG2antt1 do begin BeginUpdate(); with (Columns.Add('Tasks') as EXG2ANTTLib.Column) do begin AllowSizing := False; Width := 42; end; with (Columns.Add('Working') as EXG2ANTTLib.Column) do begin Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(258); FormatColumn := '((1:=int(0:= (value))) != 0 ? (=:1 + '' day(s)'') : '''') + (=:1 ? '' '' : '''' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != 0 ?' + ' =:1 + '' hour(s)'' : '''' ) + (=:1 ? '' '' : '''' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + '' min(s)'' : '''')'; end; HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched; DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines; GridLineStyle := EXG2ANTTLib.GridLinesStyleEnum.exGridLinesSolid; SelBackColor := Color.FromArgb(204,232,255); SelForeColor := Color.FromArgb(0,0,0); with Chart do begin SelBackColor := AxG2antt1.SelBackColor; FirstVisibleDate := '4/6/2009'; PaneWidth[False] := 164; LevelCount := 2; UnitScale := EXG2ANTTLib.UnitEnum.exHour; NonworkingHours := 15728767; ShowNonworkingDates := False; ShowNonworkingUnits := False; ShowNonworkingHours := False; with Bars.Add('Task:Split') do begin Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount] := TObject(True); Shortcut := 'Task'; end; AllowLinkBars := False; DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines; GridLineStyle := EXG2ANTTLib.GridLinesStyleEnum.exGridLinesSolid; Level[0].DrawGridLines := True; ResizeUnitScale := EXG2ANTTLib.UnitEnum.exMinute; ResizeUnitCount := 15; Label[EXG2ANTTLib.UnitEnum.exMinute] := '<|><%nn%><|><%h%>:<%nn%> <%AM/PM%><|><%d3%>, <%m3%> <%d%>, ''<%yy%> <%h%>:<%nn%> <%AM/PM%><|><%dddd%>, <%mmmm%> <%d%>, <%yyyy%> <' + '%h%>:<%nn%> <%AM/PM%><||>15'; AllowZoomOnFly := Integer(EXG2ANTTLib.ZoomOnFlyEnum.exZoomOnFlyIncludeNeighborItems) Or Integer(EXG2ANTTLib.ZoomOnFlyEnum.exZoomOnFly); BackColorZoomOnFly := $ffff; AllowNonworkingBars := True; end; Items.AllowCellValueToItemBar := True; with Items do begin AddItem(''); h := AddItem('T1'); ItemNonworkingUnits[h,TObject(False)] := '(weekday(value) in (0,6)) or (timeF(value) < `07:00:00`) or (timeF(value) >= `20:00:00`) '; AddBar(h,'','4/6/2009 7:30:00 AM','4/6/2009 9:30:00 AM','A','<c><font ;4>break<br>bar'); ItemBar[h,'A',EXG2ANTTLib.ItemBarPropertyEnum.exBarTreatAsNonworking] := TObject(True); AddBar(h,'Task','4/6/2009 10:00:00 AM','4/6/2009 12:00:00 PM',Nil,Nil); AddBar(AddItem('T2'),'Task','4/6/2009 10:00:00 AM','4/6/2009 5:45:00 PM',Nil,Nil); AddItem(''); end; EndUpdate(); end |
2047 |
It seems the ResizeUnitCount have no effect on the ZoomOnFly feature, is it normal
with AxG2antt1 do begin BeginUpdate(); with (Columns.Add('Tasks') as EXG2ANTTLib.Column) do begin AllowSizing := False; Width := 42; end; with (Columns.Add('Working') as EXG2ANTTLib.Column) do begin Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(258); FormatColumn := '((1:=int(0:= (value))) != 0 ? (=:1 + '' day(s)'') : '''') + (=:1 ? '' '' : '''' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != 0 ?' + ' =:1 + '' hour(s)'' : '''' ) + (=:1 ? '' '' : '''' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + '' min(s)'' : '''')'; end; HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched; DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines; GridLineStyle := EXG2ANTTLib.GridLinesStyleEnum.exGridLinesSolid; SelBackColor := Color.FromArgb(204,232,255); SelForeColor := Color.FromArgb(0,0,0); with Chart do begin SelBackColor := AxG2antt1.SelBackColor; FirstVisibleDate := '4/6/2009'; PaneWidth[False] := 164; LevelCount := 2; UnitScale := EXG2ANTTLib.UnitEnum.exHour; NonworkingHours := 15728767; ShowNonworkingDates := False; ShowNonworkingUnits := False; ShowNonworkingHours := False; with Bars.Item['Task'] do begin Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount] := TObject(True); end; AllowLinkBars := False; DrawGridLines := EXG2ANTTLib.GridLinesEnum.exRowLines; GridLineStyle := EXG2ANTTLib.GridLinesStyleEnum.exGridLinesSolid; Level[0].DrawGridLines := True; ResizeUnitScale := EXG2ANTTLib.UnitEnum.exMinute; ResizeUnitCount := 15; Label[EXG2ANTTLib.UnitEnum.exMinute] := '<|><%nn%><|><%h%>:<%nn%> <%AM/PM%><|><%d3%>, <%m3%> <%d%>, ''<%yy%> <%h%>:<%nn%> <%AM/PM%><|><%dddd%>, <%mmmm%> <%d%>, <%yyyy%> <' + '%h%>:<%nn%> <%AM/PM%><||>15'; AllowZoomOnFly := Integer(EXG2ANTTLib.ZoomOnFlyEnum.exZoomOnFlyIncludeNeighborItems) Or Integer(EXG2ANTTLib.ZoomOnFlyEnum.exZoomOnFly); BackColorZoomOnFly := $ffff; end; Items.AllowCellValueToItemBar := True; with Items do begin AddItem(''); AddBar(AddItem('T1'),'Task','4/6/2009 10:00:00 AM','4/6/2009 12:00:00 PM',Nil,Nil); AddBar(AddItem('T2'),'Task','4/6/2009 10:00:00 AM','4/6/2009 5:45:00 PM',Nil,Nil); AddItem(''); end; EndUpdate(); end |
2046 |
Export Data in HTML format
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddGroupItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddGroupItemEvent); begin with AxG2antt1 do begin with Items do begin ItemBold[e.item] := True; AddBar(e.item,'Summary',CellValue[TObject(e.item),TObject(2)],CellValue[TObject(e.item),TObject(4)],Nil,Nil); DefineSummaryBars(e.item,'',-3,''); end; end end; // AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin with Items do begin i := ItemToIndex[e.item]; AddBar(e.item,'Task','1/2/2008','1/9/2008','',Nil); ItemBar[e.item,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarMove] := TObject(i); ItemBar[e.item,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarDuration] := TObject(i); end; end end; with AxG2antt1 do begin BeginUpdate(); BackColorAlternate := Color.FromArgb(240,240,240); DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines; HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched; set_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarAnd,FormatABC('`<fgcolor=808080> ` + value + ` </fgcolor>`',TObject(get_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarAnd)),Nil,Nil)); FilterBarCaption := '(( ( value replace `[<b>` with `<bgcolor=000000><fgcolor=FFFFFF><b> ` replace `</b>]` with ` </b></bgcolor></fgcolor>` replace `' + '[<s>` with `<bgcolor=C0C0C0><fgcolor=FFFFFF> ` replace `</s>]` with ` </fgcolor></bgcolor>` ) + `<r><fgcolor=808080>` + ( match' + 'itemcount < 0 ? ( ( len(value) ? `` : `` ) + `<r>` + abs(matchitemcount + 1) + ` result(s)` ) : (`<r><fgcolor=808080>`+ itemcoun' + 't + ` item(s)`) )))'; FilterBarPromptVisible := Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarCompact) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarShowCloseIfRequired) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarSingleLine) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarVisible) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarPromptVisible); FilterBarPromptType := EXG2ANTTLib.FilterPromptEnum.exFilterPromptContainsAny; SingleSort := False; AllowGroupBy := True; BackColorSortBar := BackColor; DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines; with VisualAppearance do begin Add(1,'gBFLBCJwBAEHhEJAAEhABOUGACAADACAxRDgMQBQKAAzAJBIYhiG4cYCgMZhXDOCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADCMQwAFBIbhrE4ZBjHGQRUgyI43RhHUBzVI' + 'UBxDEaTZLlEYJBgeHYhDJPcaUVDcWQHGyeZwjSgpKoWSJIU5NcggPDgEwTKCmKlTAKoSzJMyEmwWRAdVTZLSEaxierKPhyWT/XgAF4PfDFKRXFqXY5mKZJFqKOI8TxIN' + 'gxPQMGyrBqraLqKwQGrGCQKSBhUZ3dS2JR3OSlYRuQAMVgOXoDZhPWZXbDtSzPE63NgtOR5DiGWalABoeoxRa9cz3ViCJSrGTqIoINIzZLHFQbPpdAYdP6BeIjXhhZxB' + 'BuLZXmEOh9CcNoni2N4MjWVodh+DpfBeLJinsWR9AyYwVAkGBhEAFphGiRogDEGBamkFgtjcZgHiMbgehYaQhAIEIREAaQYkcQZUHIGRUGQDBOEaBAhDYDxGkMZAkCge' + 'oagYZAYEYAYIAWGhemICIFj8WIiCiFR5gkIhogmBoKGKJx2C6C5hniMgggqYwog0UoNGMZJiDiCZRgOLY0ECUAQICA=='); RenderType := -268435456; end; with Chart do begin DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines; PaneWidth[False] := 196; LevelCount := 2; FirstVisibleDate := '1/1/2008'; FirstWeekDay := EXG2ANTTLib.WeekDayEnum.exMonday; with Bars.Item['Summary'] do begin StartShape := EXG2ANTTLib.ShapeCornerEnum.exShapeIconEmpty; EndShape := EXG2ANTTLib.ShapeCornerEnum.exShapeIconEmpty; Shape := EXG2ANTTLib.ShapeBarEnum.exShapeSolid; Color := $1808080; Height := 7; Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<%=%513%>'; Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18); end; with Bars.Item['Task'] do begin Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<%=(%2-%1) in (3,5) ? %513 : `` %>'; Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18); end; end; with ConditionalFormats.Add('(%2 - %1) = 3','K3') do begin ForeColor := $ff; BarColor := ForeColor; ApplyToBars := 'Task'; end; with ConditionalFormats.Add('(%2 - %1) = 5','K5') do begin ForeColor := $ff00; BarColor := ForeColor; ApplyToBars := 'Task'; end; with Columns do begin (Add('Tasks') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True); with (Add('Start') as EXG2ANTTLib.Column) do begin Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1); Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey] := ''; end; with (Add('End') as EXG2ANTTLib.Column) do begin Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2); Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey] := ''; end; end; with Items do begin AllowCellValueToItemBar := True; AddItem('Task A'); AddItem('Task A'); AddItem('Task A'); AddItem('Task A'); AddItem('Task B'); AddItem('Task B'); AddItem('Task B'); AddItem('Task C'); end; Columns.Item['Tasks'].SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending; EndUpdate(); sFile := 'c:/temp/export.html'; Export(TObject(sFile),'vis'); with (ComObj.CreateComObject(ComObj.ProgIDToClassID('InternetExplorer.Application')) as SHDocVw.ShellBrowserWindow) do begin Navigate2(sFile,Nil,Nil,Nil,Nil); end; end |
2045 |
Export Data in CSV format
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin with Items do begin i := ItemToIndex[e.item]; AddBar(e.item,'Task','1/2/2008','1/9/2008','',Nil); ItemBar[e.item,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarMove] := TObject(i); ItemBar[e.item,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarDuration] := TObject(i); end; end end; with AxG2antt1 do begin BeginUpdate(); BackColorAlternate := Color.FromArgb(240,240,240); DrawGridLines := EXG2ANTTLib.GridLinesEnum.exAllLines; HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched; set_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarAnd,FormatABC('`<fgcolor=808080> ` + value + ` </fgcolor>`',TObject(get_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarAnd)),Nil,Nil)); FilterBarCaption := '(( ( value replace `[<b>` with `<bgcolor=000000><fgcolor=FFFFFF><b> ` replace `</b>]` with ` </b></bgcolor></fgcolor>` replace `' + '[<s>` with `<bgcolor=C0C0C0><fgcolor=FFFFFF> ` replace `</s>]` with ` </fgcolor></bgcolor>` ) + `<r><fgcolor=808080>` + ( match' + 'itemcount < 0 ? ( ( len(value) ? `` : `` ) + `<r>` + abs(matchitemcount + 1) + ` result(s)` ) : (`<r><fgcolor=808080>`+ itemcoun' + 't + ` item(s)`) )))'; FilterBarPromptVisible := Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarCompact) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarShowCloseIfRequired) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarSingleLine) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarVisible) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarPromptVisible); FilterBarPromptType := EXG2ANTTLib.FilterPromptEnum.exFilterPromptContainsAny; with Chart do begin PaneWidth[False] := 196; LevelCount := 2; FirstVisibleDate := '1/1/2008'; with Bars.Item['Task'] do begin Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<%=(%2-%1) in (3,5) ? %513 : `` %>'; Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18); end; end; with ConditionalFormats.Add('(%2 - %1) = 3','K3') do begin ForeColor := $ff; BarColor := ForeColor; ApplyToBars := 'Task'; end; with ConditionalFormats.Add('(%2 - %1) = 5','K5') do begin ForeColor := $ff00; BarColor := ForeColor; ApplyToBars := 'Task'; end; with Columns do begin (Add('Tasks') as EXG2ANTTLib.Column).Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True); with (Add('Start') as EXG2ANTTLib.Column) do begin Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(1); Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey] := ''; end; with (Add('End') as EXG2ANTTLib.Column) do begin Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(2); Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey] := ''; end; end; with Items do begin AllowCellValueToItemBar := True; AddItem('Task A'); AddItem('Task A'); AddItem('Task A'); AddItem('Task A'); AddItem('Task B'); AddItem('Task B'); AddItem('Task B'); AddItem('Task C'); end; EndUpdate(); OutputDebugString( Export('','vis') ); end |
2044 |
I want to be able to detect when a user clicks on a row in the chart that is not populated
// MouseMove event - Occurs when the user moves the mouse. procedure TWinForm1.AxG2antt1_MouseMoveEvent(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent); begin with AxG2antt1 do begin item := get_ItemFromPoint(-1,-1,col,hit); date := Chart.DateFromPoint[-1,-1]; sMessage := FormatABC('(not(A = 0) ? `chart` : `list`) + ` ` + (not(B = 0) ? `item` : `empty`) ',TObject(date),TObject(item),Nil); OutputDebugString( sMessage ); end end; with AxG2antt1 do begin BeginUpdate(); with Chart do begin PaneWidth[False] := 128; LevelCount := 2; FirstVisibleDate := '1/1/2018'; end; Columns.Add('Tasks'); with Items do begin AddBar(AddItem('Task 1'),'Task','1/2/2018','1/12/2018',Nil,Nil); AddBar(AddItem('Task 2'),'Task','1/3/2018','1/13/2018',Nil,Nil); AddBar(AddItem('Task 3'),'Task','1/4/2018','1/14/2018',Nil,Nil); end; EndUpdate(); end |
2043 |
Is it possible to have multiple calendars. A calendar for each row for example. Reason : some of our lines work 2 shifts but some also have a night shift
with AxG2antt1 do begin BeginUpdate(); Columns.Add('Tasks'); with (Columns.Add('Working') as EXG2ANTTLib.Column) do begin Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(258); FormatColumn := '((1:=int(0:=( 24*int(value) + (value - int(value) + 1/24/60/60/2)*24))) != 0 ? =:1 + '' hour(s)'' : '''' ) + (=:1 ? '' '' : '''' ) + ((1' + ':=round((=:0 - =:1)*60)) != 0 ? =:1 + '' min(s)'' : '''')'; end; with Chart do begin FirstVisibleDate := '4/6/2009'; PaneWidth[False] := 148; LevelCount := 2; ShowNonworkingUnits := False; ShowNonworkingDates := False; with Bars do begin Add('Task:Split').Shortcut := 'Task'; Item['Task'].Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarKeepWorkingCount] := TObject(True); end; Label[EXG2ANTTLib.UnitEnum.exHour] := '<%h%><||><||>65536'; Level[0].FormatLabel := '`<font small fonts;6>` + value'; Level[1].FormatLabel := 'len(value) = 2 ? (`<font small fonts;4>` + (value left 1) + `<br>` + (value right 1) ) : (`<font small fonts;4>` + ` <br>` + (va' + 'lue left 1) + `` )'; UnitScale := EXG2ANTTLib.UnitEnum.exHour; UnitWidth := 9; end; Items.AllowCellValueToItemBar := True; with Items do begin sCalendar1 := 'weekday(value) in (0,6) or (hour(value) < 6) or (hour(value) > 18)'; h := AddItem('Shift 1'); ItemNonworkingUnits[h,TObject(False)] := sCalendar1; AddBar(h,'Task','4/6/2009','4/7/2009',Nil,Nil); h := AddItem('Shift 1'); ItemNonworkingUnits[h,TObject(False)] := sCalendar1; AddBar(h,'Task','4/6/2009','4/8/2009',Nil,Nil); sCalendar2 := 'weekday(value) in (0,6) or (hour(value) < 8) or (hour(value) > 14)'; h := AddItem('Shift 2'); ItemNonworkingUnits[h,TObject(False)] := sCalendar2; AddBar(h,'Task','4/6/2009','4/7/2009',Nil,Nil); h := AddItem('Shift 2'); ItemNonworkingUnits[h,TObject(False)] := sCalendar2; AddBar(h,'Task','4/6/2009','4/8/2009',Nil,Nil); sCalendar3 := 'weekday(value) in (0,6) or 0 = ( hour(value) mod 3 ) '; h := AddItem('Shift 3'); ItemNonworkingUnits[h,TObject(False)] := sCalendar3; AddBar(h,'Task','4/6/2009','4/7/2009',Nil,Nil); h := AddItem('Shift 3'); ItemNonworkingUnits[h,TObject(False)] := sCalendar3; AddBar(h,'Task','4/6/2009','4/8/2009',Nil,Nil); sCalendar4 := 'weekday(value) in (0,6)'; h := AddItem('Shift 3'); ItemNonworkingUnits[h,TObject(False)] := sCalendar4; AddBar(h,'Task','4/6/2009','4/7/2009',Nil,Nil); h := AddItem('Shift 3'); ItemNonworkingUnits[h,TObject(False)] := sCalendar4; AddBar(h,'Task','4/6/2009','4/8/2009',Nil,Nil); end; EndUpdate(); end |
2042 |
Is it possible to check multiple-items at once
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin bHasParent := FormatABC('value != 0',Items.ItemParent[e.item],Nil,Nil); with Items do begin CellHasCheckBox[TObject(e.item),TObject(0)] := False; end; end end; with AxG2antt1 do begin BeginUpdate(); LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; with (Columns.Add('Tasks') as EXG2ANTTLib.Column) do begin Def[EXG2ANTTLib.DefColumnEnum.exCellValueFormat] := TObject(1); FormatColumn := 'value + (%CS0 = 1 ? `<r><fgcolor=808080>(checked)` : ``)'; end; HeaderVisible := EXG2ANTTLib.HeaderVisibleEnum.exHeaderVisibleExtendLevels; SingleSel := False; with Items do begin h := AddItem('Project'); hChild := InsertItem(h,Nil,'Task 1'); hChild := InsertItem(h,Nil,'Task 2'); hChild := InsertItem(h,Nil,'Task 3'); ExpandItem[h] := True; LockedItemCount[EXG2ANTTLib.VAlignmentEnum.exTop] := 1; CellValue[TObject(LockedItem[EXG2ANTTLib.VAlignmentEnum.exTop,0]),TObject(0)] := '<c>Select multiple items and press the <b>SPACE</b> key'; end; EndUpdate(); end |
2041 |
How can I prevent changing the start/end colors of the bar, when ItemBar(exBarColor) property is applied
with AxG2antt1 do begin BeginUpdate(); Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA='); VisualAppearance.Add(1,'E:\Exontrol\ExButton\sample\EBN\Assorted\bhframe.ebn'); Chart.PaneWidth[False] := 96; with Chart.Bars do begin AddShapeCorner(TObject(12345),TObject(1)); AddShapeCorner(TObject(999),TObject(2)); AddShapeCorner(TObject(1049),TObject(3)); with Add('T1') do begin StartShape := EXG2ANTTLib.ShapeCornerEnum($3020 Or Integer(EXG2ANTTLib.ShapeCornerEnum.exShapeIconVBar) Or Integer(EXG2ANTTLib.ShapeCornerEnum.exShapeIconRight)); EndShape := EXG2ANTTLib.ShapeCornerEnum($3e0 Or Integer(EXG2ANTTLib.ShapeCornerEnum.exShapeIconLeft)); Pattern := EXG2ANTTLib.PatternEnum.exPatternNDot; StartColor := $ff00; Color := $1000000; EndColor := $ff; Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<%=`<font ;6> ` + %0 + ``%>'; Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18); end; with Add('T2') do begin StartShape := EXG2ANTTLib.ShapeCornerEnum($3020 Or Integer(EXG2ANTTLib.ShapeCornerEnum.exShapeIconVBar) Or Integer(EXG2ANTTLib.ShapeCornerEnum.exShapeIconRight)); EndShape := EXG2ANTTLib.ShapeCornerEnum($400 Or Integer(EXG2ANTTLib.ShapeCornerEnum.exShapeIconVBar) Or Integer(EXG2ANTTLib.ShapeCornerEnum.exShapeIconRight)); Pattern := EXG2ANTTLib.PatternEnum.exPatternNDot; StartColor := $ffffffff; Color := $1000000; EndColor := $ffffffff; Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<%=`<font ;6> ` + %0 + ``%>'; Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18); end; end; Chart.FirstVisibleDate := '1/1/2001'; Columns.Add('Column'); with Items do begin h := AddItem('Item 1'); AddBar(h,'T1','1/2/2001','1/4/2001',Nil,Nil); h := AddItem('Item 2'); AddBar(h,'T1','1/2/2001','1/4/2001',Nil,Nil); ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(65280); h := AddItem('Item 3'); AddBar(h,'T1','1/2/2001','1/4/2001',Nil,Nil); ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(255); h := AddItem('Item 4'); AddBar(h,'T2','1/2/2001','1/4/2001',Nil,Nil); h := AddItem('Item 5'); AddBar(h,'T2','1/2/2001','1/4/2001',Nil,Nil); ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(65280); h := AddItem('Item 6'); AddBar(h,'T2','1/2/2001','1/4/2001',Nil,Nil); ItemBar[h,'',EXG2ANTTLib.ItemBarPropertyEnum.exBarColor] := TObject(255); end; EndUpdate(); end |
2040 |
How can I get the icon from the cell when using the Items.CellImages property (icon index)
// MouseMove event - Occurs when the user moves the mouse. procedure TWinForm1.AxG2antt1_MouseMoveEvent(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent); begin with AxG2antt1 do begin i := get_ItemFromPoint(-1,-1,c,hit); OutputDebugString( FormatABC('( 0x44 = ( value bitand 0x44 ) ) ? ( ( (value bitand 0xFFFF0000) bitshift 16 ) array B split `,` ) : `no image`',TObject(hit),Items.CellImages[TObject(i),TObject(c)],Nil) ); end end; with AxG2antt1 do begin BeginUpdate(); Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA='); Chart.PaneWidth[True] := 0; Columns.Add('Default'); with Items do begin CellImages[TObject(AddItem('Item 1')),TObject(0)] := '3,2,1'; CellImages[TObject(AddItem('Item 2')),TObject(0)] := '2,3'; CellImages[TObject(AddItem('Item 3')),TObject(0)] := '2,'; end; EndUpdate(); end |
2039 |
How can I get the icon from the cell when using the Items.CellImages property (icon position within the cell)
// MouseMove event - Occurs when the user moves the mouse. procedure TWinForm1.AxG2antt1_MouseMoveEvent(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent); begin with AxG2antt1 do begin i := get_ItemFromPoint(-1,-1,c,hit); OutputDebugString( FormatABC('( 0x44 = ( value bitand 0x44 ) ) ? 1 + ( (value bitand 0xFFFF0000) bitshift 16 ) : `no image`',TObject(hit),Nil,Nil) ); end end; with AxG2antt1 do begin BeginUpdate(); Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA='); Chart.PaneWidth[True] := 0; Columns.Add('Default'); with Items do begin CellImages[TObject(AddItem('Item 1')),TObject(0)] := '3,2,1'; CellImages[TObject(AddItem('Item 2')),TObject(0)] := '2,3'; CellImages[TObject(AddItem('Item 3')),TObject(0)] := '2'; end; EndUpdate(); end |
2038 |
I have an EBN bar. Now if I apply an additional color to the bar, e,g, yellow, the bar is displayed as "dark yellow", which I assume is due to the black EBN color. How can I get the more "bright yellow" color
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddGroupItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddGroupItemEvent); begin with AxG2antt1 do begin with Items do begin ItemDividerLine[e.item] := EXG2ANTTLib.DividerLineEnum.EmptyLine; AddBar(e.item,'Summary','12/2/2017','12/2/2017',Nil,Nil); DefineSummaryBars(e.item,'',-3,''); l := GroupItem[e.item]; CellSingleLine[TObject(e.item),TObject(l)] := EXG2ANTTLib.CellSingleLineEnum.exCaptionWordWrap; CellBold[TObject(e.item),TObject(l)] := True; ItemBackColor[e.item] := $bebebe; end; Chart.ItemBackColor[e.item] := $bebebe; end end; // AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin Items.AddBar(e.item,'Task','12/4/2017','12/10/2017',Nil,Nil); end end; with AxG2antt1 do begin BeginUpdate(); with VisualAppearance do begin Add(1,'gBFLBCJwBAEHhEJAAEhABOUGACAADACAxRDgMQBQKAAzAJBIYhiG4cYCgMZhXDOCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADCMQwAFBIbhrE4ZBjHGQRUgyI43RhHUBzVI' + 'UBxDEaTZLlEYJBgeHYhDJPcaUVDcWQHGyeZwjSgpKoWSJIU5NcggPDgEwTKCmKlTAKoSzJMyEmwWRAdVTZLSEaxierKPhyWT/XgAF4PfDFKRXFqXY5mKZJFqKOI8TxIN' + 'gxPQMGyrBqraLqKwQGrGCQKSBhUZ3dS2JR3OSlYRuQAMVgOXoDZhPWZXbDtSzPE63NgtOR5DiGWalABoeoxRa9cz3ViCJSrGTqIoINIzZLHFQbPpdAYdP6BeIjXhhZxB' + 'BuLZXmEOh9CcNoni2N4MjWVodh+DpfBeLJinsWR9AyYwVAkGBhEAFphGiRogDEGBamkFgtjcZgHiMbgehYaQhAIEIREAaQYkcQZUHIGRUGQDBOEaBAhDYDxGkMZAkCge' + 'oagYZAYEYAYIAWGhemICIFj8WIiCiFR5gkIhogmBoKGKJx2C6C5hniMgggqYwog0UoNGMZJiDiCZRgOLY0ECUAQICA=='); RenderType := -268435456; end; with Chart do begin LevelCount := 2; FirstVisibleDate := '12/2/2017'; PaneWidth[False] := 342; with Bars.Item['Summary'] do begin StartShape := EXG2ANTTLib.ShapeCornerEnum.exShapeIconEmpty; EndShape := EXG2ANTTLib.ShapeCornerEnum.exShapeIconEmpty; Shape := EXG2ANTTLib.ShapeBarEnum.exShapeSolid; Color := $1ff0000; Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<%=%513%>'; Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18); end; end; with Columns do begin Add('C1'); Add('C2'); Add('C3'); with (Add('Pos') as EXG2ANTTLib.Column) do begin FormatColumn := '1 pos ``'; AllowGroupBy := False; Position := 0; Width := 48; AllowSizing := False; end; end; SortBarVisible := True; SortBarCaption := 'Drag a <b>column</b> header here to group by that column.'; AllowGroupBy := True; HasLines := EXG2ANTTLib.HierarchyLineEnum.exNoLine; LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exNoLinesAtRoot; with Items do begin h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; CellValue[TObject(h),TObject(2)] := 'SubItem A.2'; h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; CellValue[TObject(h),TObject(2)] := 'SubItem A.2'; h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; CellValue[TObject(h),TObject(2)] := 'SubItem A.2'; h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; CellValue[TObject(h),TObject(2)] := 'SubItem A.2'; h := AddItem('Item B'); CellValue[TObject(h),TObject(1)] := 'SubItem B.1'; CellValue[TObject(h),TObject(2)] := 'SubItem B.2'; h := AddItem('Item B'); CellValue[TObject(h),TObject(1)] := 'SubItem B.1'; CellValue[TObject(h),TObject(2)] := 'SubItem B.2'; end; with Columns.Item[TObject(0)] do begin SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending; end; EndUpdate(); end |
2037 |
Is it possible to change the visual appearance of the position signs when user changes the column's position by drag and drop
with AxG2antt1 do begin BeginUpdate(); HeaderAppearance := EXG2ANTTLib.AppearanceEnum.Etched; with Columns do begin Add('Column 1'); Add('Column 2'); Add('Column 3'); end; with VisualAppearance do begin Add(1,'gBFLBCJwBAEHhEJAAEhABZEGACAADACAxRDgMQBQKAAzAJBIYhiG4cYCgMYxXDOCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADKMA4SOKIZhrE4bBhGaQRUgyI43RhHUBzVI' + 'UcQvE6TZRHCQYHgkNIhDJIM7TPLkeSVJaTIRoKhJUogApQThTMgVRDEThkGoSa6soSoYTDBKybLrSLKagOT5YUDKUqSdKEZRpEq1YztWbaQoCUoqVRRVIWfbNd4JJa4a' + 'DhWpYdpeeY5R7bWLgBYVVABL7LLRsSxpHxPF6RXxaeI3GKsaS8G6ic6nPQMHj7I4NS5pUa6Rh2VYNSa8AAtETRYznOw4bTMXAjNIea5bAYIIR5HIoDzVbQcCQAHL9DBe' + 'EMIQEEISgGhMGZQmocgymoYRRCIEQ0G2HYBnEIBig4V4zCQGINnmagCECY43medZ6H2Pw/g+X5fnueh/h+R5+AKABfkMWgGgGYA4AICoCGCE5WA4CphACMgSD2IRIDIB' + 'ICmEd5YGCBpRjGBgegWIYIgWdgoGIRQsiKCZiAiJZ0gGQI4jUS4LECOAiBmDJflGfg2BSY4Al4OhGkOCJ2DgFJjGGfgqgiH5Ch4RhGkqOQmEOEpkFkHQYhJRYyESAokG' + 'KHhIhKIxJEmf4VGUeRGFmF5iBkchPhYJQ5GoYIZg6Ug6GoFYmkmNhuhulRGHKGoImefh0BUZ4JmYeoemeSZ2H6HQmgoBgXDqXwUAQgI='); Add(2,'CP:1 0 -36 0 0'); end; set_Background(EXG2ANTTLib.BackgroundPartEnum.exColumnsPositionSign,$2000000); EndUpdate(); end |
2036 |
Overlaid-Types
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin with Items do begin barName := ItemData[e.item]; AddBar(e.item,TObject(barName),'1/2/2001','1/4/2001','A1',Nil); AddBar(e.item,TObject(barName),'1/3/2001','1/5/2001','A2',Nil); AddBar(e.item,TObject(barName),'1/4/2001','1/7/2001','A3',Nil); AddBar(e.item,TObject(barName),'1/5/2001','1/8/2001','A4',Nil); end; end end; with AxG2antt1 do begin BeginUpdate(); DefaultItemHeight := 22; Columns.Add('Task'); ScrollBySingleLine := True; BackColorAlternate := Color.FromArgb(240,240,240); DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines; with Chart do begin DrawGridLines := EXG2ANTTLib.GridLinesEnum.exHLines; ShowNonworkingDates := False; PaneWidth[False] := 164; FirstVisibleDate := '12/28/2000'; LevelCount := 2; Bars.Copy('Task','Intersect').Color := $ff; Bars.Item['Task'].OverlaidType := EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsNone; with Bars.Copy('Task','Task-Transparent') do begin OverlaidType := EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsNone; Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarTransparent] := TObject(50); Pattern := EXG2ANTTLib.PatternEnum.exPatternBox; Color := $0; StartColor := $ff5050; EndColor := StartColor; end; Bars.Copy('Task','Task-Offset').OverlaidType := EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsOffset; with Bars.Copy('Task','Task-OffsetTransparent') do begin OverlaidType := Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsTransparent) Or Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsOffset); Overlaid[EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsTransparent] := TObject(75); end; with Bars.Copy('Task','Task-Intersect') do begin OverlaidType := EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsIntersect; Overlaid[EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsIntersect] := 'Intersect'; end; Bars.Copy('Task','Task-Stack').OverlaidType := EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; with Bars.Copy('Task','Task-StackAutoArrange') do begin OverlaidType := Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange) Or Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack); Color := $ff; OverlaidGroup := 'Task'; end; with Bars.Copy('Task','Task-Cascade') do begin OverlaidType := EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsCascade; Color := $ff; OverlaidGroup := 'Task'; end; with Bars.Copy('Task','Task-Strict') do begin OverlaidType := Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStrict) Or Integer(EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack); OverlaidGroup := 'Task'; Color := $ff; end; end; with Items do begin InsertItem(0,'Task','Overlaid-None'); InsertItem(0,'Task-Transparent','Overlaid-Semi-Transparent'); InsertItem(0,'Task-Offset','Overlaid-Offset'); InsertItem(0,'Task-OffsetTransparent','Overlaid-OffsetTransparent'); InsertItem(0,'Task-Intersect','Overlaid-Intersect'); InsertItem(0,'Task-Stack','Overlaid-Stack'); h := InsertItem(0,'Task-StackAutoArrange','Overlaid-StackAutoArrange'); AddBar(h,'Task','1/7/2001','1/9/2001','T1',Nil); AddBar(h,'Task','1/3/2001','1/5/2001','T2',Nil); AddBar(h,'Task','1/4/2001','1/7/2001','T3',Nil); AddBar(h,'Task','1/5/2001','1/8/2001','T4',Nil); h := InsertItem(0,'Task-Cascade','Overlaid-Cascade'); AddBar(h,'Task','1/7/2001','1/9/2001','T1',Nil); AddBar(h,'Task','1/3/2001','1/5/2001','T2',Nil); AddBar(h,'Task','1/4/2001','1/7/2001','T3',Nil); AddBar(h,'Task','1/5/2001','1/8/2001','T4',Nil); ItemBar[h,'<A*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarOverlaidKey] := 'A'; ItemBar[h,'<T*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarOverlaidKey] := 'T'; h := InsertItem(0,'Task','Overlaid-StackStrict'); AddBar(h,'Task-Strict','1/7/2001','1/9/2001','T1',Nil); ItemBar[0,'<*>',EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<%=%9%>'; end; EndUpdate(); end |
2035 |
FilterBarCaption ALLUI Keyword ( sample 3, result, leaf )
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddGroupItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddGroupItemEvent); begin with AxG2antt1 do begin with Items do begin ItemBackColor[e.item] := $f0f0f0; val := CellValue[TObject(e.item),TObject(GroupItem[e.item])]; CellState[TObject(e.item),TObject(GroupItem[e.item])] := AxG2antt1.FormatABC('A = `Checked` ? 1 : 0',TObject(val),Nil,Nil); end; with Items do begin ItemDividerLine[e.item] := EXG2ANTTLib.DividerLineEnum.EmptyLine; AddBar(e.item,'Summary','12/2/2017','12/2/2017',Nil,Nil); DefineSummaryBars(e.item,'',-3,''); l := GroupItem[e.item]; CellSingleLine[TObject(e.item),TObject(l)] := EXG2ANTTLib.CellSingleLineEnum.exCaptionWordWrap; CellBold[TObject(e.item),TObject(l)] := True; end; Chart.ItemBackColor[e.item] := $f0f0f0; end end; // AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin i := FormatABC('value + 1',Items.ItemToIndex[e.item],Nil,Nil); Items.CellImage[TObject(e.item),TObject(3)] := i; Items.AddBar(e.item,'Task','12/4/2017','12/14/2017',Nil,Nil); end end; with AxG2antt1 do begin BeginUpdate(); VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhABOUGACAADACAxRDgMQBQKAAzAJBIYhiG4cYCgMZhXDOCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADCMQwAFBIbhrE4ZBjHGQRUgyI43RhHUBzVI' + 'UBxDEaTZLlEYJBgeHYhDJPcaUVDcWQHGyeZwjSgpKoWSJIU5NcggPDgEwTKCmKlTAKoSzJMyEmwWRAdVTZLSEaxierKPhyWT/XgAF4PfDFKRXFqXY5mKZJFqKOI8TxIN' + 'gxPQMGyrBqraLqKwQGrGCQKSBhUZ3dS2JR3OSlYRuQAMVgOXoDZhPWZXbDtSzPE63NgtOR5DiGWalABoeoxRa9cz3ViCJSrGTqIoINIzZLHFQbPpdAYdP6BeIjXhhZxB' + 'BuLZXmEOh9CcNoni2N4MjWVodh+DpfBeLJinsWR9AyYwVAkGBhEAFphGiRogDEGBamkFgtjcZgHiMbgehYaQhAIEIREAaQYkcQZUHIGRUGQDBOEaBAhDYDxGkMZAkCge' + 'oagYZAYEYAYIAWGhemICIFj8WIiCiFR5gkIhogmBoKGKJx2C6C5hniMgggqYwog0UoNGMZJiDiCZRgOLY0ECUAQICA=='); with Chart do begin LevelCount := 2; FirstVisibleDate := '12/2/2017'; PaneWidth[False] := 256; with Bars.Item['Summary'] do begin StartShape := EXG2ANTTLib.ShapeCornerEnum.exShapeIconEmpty; EndShape := EXG2ANTTLib.ShapeCornerEnum.exShapeIconEmpty; Shape := EXG2ANTTLib.ShapeBarEnum.exShapeSolid; Color := $1000000; Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<%=%513%>'; Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18); end; end; Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA='); with (Columns.Add('Col-1') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsAsc); end; with (Columns.Add('Col-2') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsAsc); end; with (Columns.Add('Check') as EXG2ANTTLib.Column) do begin Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True); DisplayFilterButton := True; DisplayFilterPattern := False; FilterType := EXG2ANTTLib.FilterTypeEnum.exCheck; end; with (Columns.Add('Image') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterType := EXG2ANTTLib.FilterTypeEnum.exImage; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox); end; with (Columns.Add('Pos') as EXG2ANTTLib.Column) do begin AllowSizing := False; AllowSort := False; Width := 32; FormatColumn := '1 rpos ``'; Position := 0; end; with Items do begin CellValue[TObject(AddItem('Item A')),TObject(1)] := 'Sub-Item A'; h := AddItem('Item B'); CellValue[TObject(h),TObject(1)] := 'Sub-Item B'; CellState[TObject(h),TObject(2)] := 1; CellValue[TObject(AddItem('Item C')),TObject(1)] := 'Sub-Item C'; end; FilterBarFont := (Font as stdole.StdFont); set_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarAnd,FormatABC('`<fgcolor=808080> ` + value + ` </fgcolor>`',TObject(get_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarAnd)),Nil,Nil)); FilterBarCaption := '(( ( allui replace `[<b>` with `<bgcolor=000000><fgcolor=FFFFFF><b> ` replace `</b>]` with ` </b></bgcolor></fgcolor>` replace `' + '[<s>` with `<bgcolor=C0C0C0><fgcolor=FFFFFF> ` replace `</s>]` with ` </fgcolor></bgcolor>` ) + `<r><fgcolor=808080>` + ( match' + 'itemcount < 0 ? ( ( len(value) ? `` : `` ) + `<r>` + leafitemcount + ` result(s)` ) : (`<r><fgcolor=808080>`+ leafitemcount + ` ' + 'item(s)`) )))'; FilterBarPromptVisible := Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarVisible) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarPromptVisible); AllowGroupBy := True; SortBarVisible := True; with Columns.Item[TObject(2)] do begin FormatColumn := '%CS2 ? `Checked` : `Unchecked`'; SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending; end; EndUpdate(); end |
2034 |
A black portion is shown while I am using the BackColorAlternate with EBN colors. What can I do
with AxG2antt1 do begin BeginUpdate(); ColumnAutoResize := True; DefaultItemHeight := 20; VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhIDhAxHAxg0HG0Mg4xGI3HMOig3GcJiYAf8jAEhhUnAAyhEqg8hk0oAsIjgAiAwmYxGA4mYzGwwkI0i0ooUnB0IBMIl1Dg8zmYyGolptPkI1mY' + '1GAll9KoUslNIrVCqNQldShFUstXAVfrVcrlZtVhuFnsUHq1zoczoQGhFBkNpg6zbDykUkhsPHE2h85nc9n8xtVDtlex9Msd2p1YstVq9ux8HyMtzuFz1PsNTzQlv2hh' + 'WfkuqpeVuN0q+nvEooN5veSAGpkb/ACcZrvhU3w83nM/poxGuchGpoVBvWgg+8knA4WimnFxI45Er5XOlHMg/Q3XU33W4ew9Wyu11mchDagcO7zus8VDoNBBEIKBpMY6' + 'DqOQyokhA/IQIQmwMk4bIQFDcoO6LWgwhQkNcABwEyAB5GwWbet6cRQg3DENQ5D8QxADZvEkAB8nabsURGeBpFM3pwE2AEZRpDx/neZpOR3Dz9oO/r/wCMoZNTBQAQRJ' + 'SEwYg8HPGhEIoNCaEwq10gQ2WcRt7LcRxRFpuxUAEURQ3sczBEMgTTG8gN7HpOSEAEiQBAQZpmQ0DibPUFwbKcHwkhQoQtNQNzNEMbABOKDy/DMYQzHLeoPL0OTJSUd0' + 'pHcxTewk5zrIygIRPslz4lEngBKIAQivgASs/kLSBTlO00f8t0vGcgUbDlDRjXLCUNRERRvRgAHW2oAICA=='); with (Columns.Add('Default') as EXG2ANTTLib.Column) do begin Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True); PartialCheck := True; end; with (Columns.Add('Position') as EXG2ANTTLib.Column) do begin FormatColumn := '1 rindex ``'; Visible := False; end; with ConditionalFormats.Add('%C1 mod 2',Nil) do begin BackColor := $1000000; end; with Items do begin AddItem('Item 1'); AddItem('Item 2'); AddItem('Item 3'); AddItem('Item 4'); end; EndUpdate(); end |
2033 |
How can I specify alternate background colors for each root item, similar with BackColorAlternate
with AxG2antt1 do begin BeginUpdate(); LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; with (Columns.Add('Default') as EXG2ANTTLib.Column) do begin Def[EXG2ANTTLib.DefColumnEnum.exCellHasCheckBox] := TObject(True); PartialCheck := True; end; with (Columns.Add('Position') as EXG2ANTTLib.Column) do begin FormatColumn := '( ( 1:=( ( 0:=(1 rpos '''') ) lfind `.`) ) < 0 ? =:0 : (=:0 left =:1) )'; Visible := False; end; with ConditionalFormats.Add('%C1 mod 2',Nil) do begin BackColor := $f0f0f0; end; with Items do begin h := AddItem('Root 1'); InsertItem(h,Nil,'Child 1'); InsertItem(h,Nil,'Child 2'); ExpandItem[h] := True; h := AddItem('Root 2'); InsertItem(h,Nil,'Child 1'); InsertItem(h,Nil,'Child 2'); h := AddItem('Root 3'); InsertItem(h,Nil,'Child 1'); InsertItem(h,Nil,'Child 2'); end; EndUpdate(); end |
2032 |
How can I change the visual appearance of the +/- buttons, open/close glyphs as current visual theme (method 4)
with AxG2antt1 do begin BeginUpdate(); LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; VisualDesign := 'gBFLBWIgBAEHhEJAEGg6VAkHeLpgwChAOhULB8XAUUg8MAAREEHGMcgRCJ0ei8dhABDEcQAAYAQGKIYBkAKBQAGaAoDDMOQwQwAAxjGKEEwsACEIrjKCRShyCYZRhGcT' + 'SBCIZBqEqSZLiEZRQiiCYsS5GQBRWAkEwiBiEQTjea5CgOIAFS7LIqjRQEBxhIaZYIGaiQADENo9TxIMZAfBIHShK6NJABCCSQKkYx0HScRijDIEFwGIQmbKiej4DCiC' + 'QQW7OYYRVCNMQSfa8HivJyrcamfp/YBgOBYHb1eLVPR5LwfPCGUw1P6PLxkORZHimK4tSLHV7xVpMIwZFafIQhCCoHomS5NU7UNR0TQUFx9FaGX7rDDsGwLAJ6XRgF4b' + 'g2VpnHePpenAN4bH2GwHFmApSjEGBLnWOpRGOTBZHOegrE6BxPiWVJqCweQrn0LgJAWJBjwgaw1gKO5HmWch5h+fovF+G5bmich4BgfZkB8dynRUVYqiUR5rnmex/F6N' + '4tn2AJfnebZ3DEXw3HWXgzAyIwgicKJKBKEIhCeCgiHyHYFEmSAFmqBghFIdgSCeIJygYDAyAgJx6AoIINAMOJNCgCZCGoGoLmMCI+CwJoihMNglCCIhzFCUg0EmMhgh' + 'WDBkAiQg9CUY4jEYN4Jk2IxklYJoJHIUg+CSZJSESFwkkkGI+FOFIJEIRhPhMCRJCSVoRrSBhiDgTZjHYT4PEkYhwhgJYm0SaIaiaSYuE+GQNlmCIBGCJxjhiZQ5AkMh' + 'Ag6ExJCkPhPguaAiFYUAlAkKZ0g6HoOEmWR/GHcA4m0OwIlIJIHCRgQshGJhpjoaocieaZiC6GAimkUgehIOwnGYGYIGkah6jaE4rg6SpCjKK5rEOMYlGIGIihKOgglo' + 'Foqj6L5aGaBo6CkGIkAQjiPpCAAaJILCTJQlKPACDaXJgmSaJsnCdJ4nygKEoijKQpSmKcqCpKoqysK0rivLAsSyLMtC1LYty4Lkui7LwvS+L8wDBMIwzEMUxjHMgyTK' + 'MszDNM4zzQNE0jTNQ1TWNc2DZNo2zcN03jfOA4TiOM5DlOY5zoOk6jrOw7TuO88DxPI8z0PU9j3Pg+T6Ps/D9P4/0AQFAkDQRBUGQdCEJQpC0MQ1DkPRBEUSRNFEVBhF' + 'kXRhGQ9D6Dxfh+W5gGGd4QH2XQjCmDpFFaKoVB+D5Xmed5+H8YAHnIAh9EwV5Fl0d4MkMKJICmSgygSJAoEmMUCIPgnDCCIOQFYCxJjwFoCcA4kxoF+AIJkAgExegDEg' + 'EYQInAzCUAIOEGgfxiiRDYF1Q4EQ2BSCaEQYwbAiKREMpRSymFNDIAkAxT6oVRgSA2qdVKq1WqvVirMZQUhSCnBUMoIgoQRgnGSIQUgkg1hIHYAkAYMROAmHiLsE4xxS' + 'CxBwEwCQ0wmDdBsE0GYXBtg2CSPMFIuwYiQBYBQeAcwOCnBCCZgw0g0glBONAQgqQThCGgPQGoBQfiRGmOEZIPAXjsBoPAO4HRThhA0EQSA5BAgaCKJIGg3QdhOCmNUB' + 'oQAijTCIF0FwQxpCHDIPAYYMQGgtCmFcaQtRAjZCyFYSojQ2B2BoKwIYFApBXEIBsIQ1QsAWAWEwaA1xCgjAoIAQBAQ='; Columns.Add('Column'); with Items do begin h := AddItem('Root 1'); InsertItem(h,Nil,'Child 1'); InsertItem(h,Nil,'Child 2'); ExpandItem[h] := True; h := AddItem('Root 2'); InsertItem(h,Nil,'Child'); end; EndUpdate(); end |
2031 |
How can I change the visual appearance of the +/- buttons, open/close glyphs as current visual theme (method 3)
with AxG2antt1 do begin BeginUpdate(); with VisualAppearance do begin Add(3,'gBFLBCJwBAEHhEJAAEhABDwCg6AADACAxRDgMQBQKAAzAJBIYhiG4cYCgMZhXDOCYXABCEYRXBIZQ7BKNIxjSJ5BhIAAyDSJMjSRJUEhqGCWYDleYYYAKHIMQLJQKQSB' + 'cQR9EaBZBAWTpQC0OJDTJRI4TNAgbSYAAYRqoCb6loTKypaxjCQQIgkUBpGKdBynEYsDwSGyJCCJWyIbpKAwoVbcs4AYhuJpaQi+d5PFbjVT8dLAMBwLA8EwXAJ+OpfD' + 'xXU7eFKpR5fchXTI8UxXFqXZhkeQrfh7KYVRBKdBQRBEFQPJqnahqOpaXo2RoLUJKcQwHTmHYNQTALyuTALZrWeZ3XrgN74LbtZzVQauYRpbCMEr6bpoWLnFi6Ho1U4l' + 'lWah1jqSweFqfxPgQQRphi+Yak0YIuqUfJegef4zluaJ3nqPJeCYH4BAeX5TDLBpVGqKRRnwf4flefZtHsX54BYAR/F+EwVnUd5eAMMJKDIChygyIQpAoEh4iIJ5JlgX' + 'IcgCXpIGoFwnGEQh6BEKBgmMIICHgIJCAiUAzgyUoAhwJohkiRgygwYpiGoKwzGIcgKCkNQNCMRIbCYCRYk4QoMiOchWDwNBjhiJJaDYTRiGiFwlCQAhOE8JBJHITIRg' + 'wZRZFCFCZBkOIUhKTRpCWAwgGYQ4El4NxlBifIWCcCYCFoaoMGaKYyG6GxlBmGJdhkCAWBIeA5g4U4QhMJAImkPIShRVxGgQJRlCIUISh+SJpnCZIeBgFgiHgO4OlOMI' + 'NCISByECDQikkGhuh2JwpmqBogCKaYiC6FwhmkQ4yHgYgYiaHopiuaRakCbIsisSpGjYOwaHYKYMCkK5CA2IxrCwCwFigaJrkLTI6lcdANAEgIA='); Add(1,'CP:3 -2 -2 2 2'); Add(4,'gBFLBCJwBAEHhEJAAEhABEICg6AADACAxRDgMQBQKAAzAJBIYhiG4cYCgMZhXDOCYXABCEYRXBIZQ7BKNIxjSJ5BhIAAyDSJMjSRJUEhqGCWYDleYYYAKHIMQLJQKQSB' + 'cQR9EaBZBAWTpQC0OJDTJRI4TNAgbSYAAYRqoCb6loTKypaxjCQQIgkUBpGKdBynEYsDwSGyJCCJWyIbpKAwoVbcs4AYhuJpaQi+d5PFbjVT8dLAMBwLA8EwXAJ+OpfD' + 'xXU7eFKpR5fchXTI8UxXFqXZhkeQrfh7KYVRBKdBQRBEFQPJqnahqOpaXo2RoLUJKcQwHTmHYNQTALyuTALZrWeZ3XrgN74LbtZzVQauYRpbCMEr6bpoWLnFi6Ho1U4l' + 'lWah1jqSweFqfxPgQQRphi+Yak0YIuqUfJeg8X4rluaZ3niGB+AQHx/EyShjjEVYqiUR5rnmex/GAB5+AIf4gEeXJFHyXZ3gCTAygyAociMKBKEKBIeCiCZyHYFAnCEe' + 'Bkh+BghFgRIegOCgYCySAgh4CAkgINAMmMNIgCcCYjn4LoLmMCJGDKC5ijIagoDMYhCAoJg1A0IxEhsJgJFiThChCY5yFYPA0GOGIYloNhNGIaIXCUJACE4TwkEkchOF' + 'SFYlFkXhUCUCQZEYTglCSMxaEkYJIBmFJhDeDZZEYPwlgmQhghaGqVDoa4bGaeY6FGGZNlmFIBGEJ4jhiZQ5AkMhAg6E5JCkRoGCUSQ6B6CYiSCBIOh+DhJmmARiWQOJ' + 'tDsCJSCSBwkXSLIRicaZ6HqIIomoIguhwIpphIHoWDsJ4mCGChpmqOpGheLIOkqUo2iya4DjGJxihiQoSj4IJaDaMpCjCWoGg6PgpBiQ4tHcQJQBAgI='); Add(2,'CP:4 -2 -2 2 2'); end; LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exGroupLinesAtRoot; HasButtons := EXG2ANTTLib.ExpandButtonEnum.exCustom; set_HasButtonsCustom(False,16777216); set_HasButtonsCustom(True,33554432); Columns.Add('Column'); with Items do begin h := AddItem('Root 1'); InsertItem(h,Nil,'Child 1'); InsertItem(h,Nil,'Child 2'); ExpandItem[h] := True; h := AddItem('Root 2'); InsertItem(h,Nil,'Child'); end; EndUpdate(); end |
2030 |
How can I change the visual appearance of the +/- buttons, open/close glyphs as current visual theme (method 2)
with AxG2antt1 do begin BeginUpdate(); with VisualAppearance do begin Add(1,'XP:TREEVIEW 2 1'); Add(2,'XP:TREEVIEW 2 2'); end; set_Background(EXG2ANTTLib.BackgroundPartEnum.exTreeGlyphOpen,$1000000); set_Background(EXG2ANTTLib.BackgroundPartEnum.exTreeGlyphClose,$2000000); LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; Columns.Add('Column'); with Items do begin h := AddItem('Root 1'); InsertItem(h,Nil,'Child 1'); InsertItem(h,Nil,'Child 2'); ExpandItem[h] := True; h := AddItem('Root 2'); InsertItem(h,Nil,'Child'); end; EndUpdate(); end |
2029 |
How can I find if the control is running in DPI mode
|
2028 |
How can I change the visual appearance of the +/- buttons (method 1)
with AxG2antt1 do begin BeginUpdate(); with VisualAppearance do begin Add(1,'gBFLBCJwBAEHhEJAAEhABDwCg6AADACAxRDgMQBQKAAzAJBIYhiG4cYCgMZhXDOCYXABCEYRXBIZQ7BKNIxjSJ5BhIAAyDSJMjSRJUEhqGCWYDleYYYAKHIMQLJQKQSB' + 'cQR9EaBZBAWTpQC0OJDTJRI4TNAgbSYAAYRqoCb6loTKypaxjCQQIgkUBpGKdBynEYsDwSGyJCCJWyIbpKAwoVbcs4AYhuJpaQi+d5PFbjVT8dLAMBwLA8EwXAJ+OpfD' + 'xXU7eFKpR5fchXTI8UxXFqXZhkeQrfh7KYVRBKdBQRBEFQPJqnahqOpaXo2RoLUJKcQwHTmHYNQTALyuTALZrWeZ3XrgN74LbtZzVQauYRpbCMEr6bpoWLnFi6Ho1U4l' + 'lWah1jqSweFqfxPgQQRphi+Yak0YIuqUfJegef4zluaJ3nqPJeCYH4BAeX5TDLBpVGqKRRnwf4flefZtHsX54BYAR/F+EwVnUd5eAMMJKDIChygyIQpAoEh4iIJ5JlgX' + 'IcgCXpIGoFwnGEQh6BEKBgmMIICHgIJCAiUAzgyUoAhwJohkiRgygwYpiGoKwzGIcgKCkNQNCMRIbCYCRYk4QoMiOchWDwNBjhiJJaDYTRiGiFwlCQAhOE8JBJHITIRg' + 'wZRZFCFCZBkOIUhKTRpCWAwgGYQ4El4NxlBifIWCcCYCFoaoMGaKYyG6GxlBmGJdhkCAWBIeA5g4U4QhMJAImkPIShRVxGgQJRlCIUISh+SJpnCZIeBgFgiHgO4OlOMI' + 'NCISByECDQikkGhuh2JwpmqBogCKaYiC6FwhmkQ4yHgYgYiaHopiuaRakCbIsisSpGjYOwaHYKYMCkK5CA2IxrCwCwFigaJrkLTI6lcdANAEgIA='); Add(2,'gBFLBCJwBAEHhEJAAEhABEICg6AADACAxRDgMQBQKAAzAJBIYhiG4cYCgMZhXDOCYXABCEYRXBIZQ7BKNIxjSJ5BhIAAyDSJMjSRJUEhqGCWYDleYYYAKHIMQLJQKQSB' + 'cQR9EaBZBAWTpQC0OJDTJRI4TNAgbSYAAYRqoCb6loTKypaxjCQQIgkUBpGKdBynEYsDwSGyJCCJWyIbpKAwoVbcs4AYhuJpaQi+d5PFbjVT8dLAMBwLA8EwXAJ+OpfD' + 'xXU7eFKpR5fchXTI8UxXFqXZhkeQrfh7KYVRBKdBQRBEFQPJqnahqOpaXo2RoLUJKcQwHTmHYNQTALyuTALZrWeZ3XrgN74LbtZzVQauYRpbCMEr6bpoWLnFi6Ho1U4l' + 'lWah1jqSweFqfxPgQQRphi+Yak0YIuqUfJeg8X4rluaZ3niGB+AQHx/EyShjjEVYqiUR5rnmex/GAB5+AIf4gEeXJFHyXZ3gCTAygyAociMKBKEKBIeCiCZyHYFAnCEe' + 'Bkh+BghFgRIegOCgYCySAgh4CAkgINAMmMNIgCcCYjn4LoLmMCJGDKC5ijIagoDMYhCAoJg1A0IxEhsJgJFiThChCY5yFYPA0GOGIYloNhNGIaIXCUJACE4TwkEkchOF' + 'SFYlFkXhUCUCQZEYTglCSMxaEkYJIBmFJhDeDZZEYPwlgmQhghaGqVDoa4bGaeY6FGGZNlmFIBGEJ4jhiZQ5AkMhAg6E5JCkRoGCUSQ6B6CYiSCBIOh+DhJmmARiWQOJ' + 'tDsCJSCSBwkXSLIRicaZ6HqIIomoIguhwIpphIHoWDsJ4mCGChpmqOpGheLIOkqUo2iya4DjGJxihiQoSj4IJaDaMpCjCWoGg6PgpBiQ4tHcQJQBAgI='); end; LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; set_Background(EXG2ANTTLib.BackgroundPartEnum.exTreeGlyphOpen,$1000000); set_Background(EXG2ANTTLib.BackgroundPartEnum.exTreeGlyphClose,$2000000); Columns.Add('Column'); with Items do begin h := AddItem('Root 1'); InsertItem(h,Nil,'Child 1'); InsertItem(h,Nil,'Child 2'); ExpandItem[h] := True; h := AddItem('Root 2'); InsertItem(h,Nil,'Child'); end; EndUpdate(); end |
2027 |
How can I add a summary bar once the user group by a column
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddGroupItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddGroupItemEvent); begin with AxG2antt1 do begin with Items do begin ItemDividerLine[e.item] := EXG2ANTTLib.DividerLineEnum.EmptyLine; AddBar(e.item,'Summary','12/2/2017','12/2/2017',Nil,Nil); DefineSummaryBars(e.item,'',-3,''); l := GroupItem[e.item]; CellSingleLine[TObject(e.item),TObject(l)] := EXG2ANTTLib.CellSingleLineEnum.exCaptionWordWrap; CellBold[TObject(e.item),TObject(l)] := True; ItemBackColor[e.item] := $bebebe; end; Chart.ItemBackColor[e.item] := $bebebe; end end; // AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin Items.AddBar(e.item,'Task','12/4/2017','12/10/2017',Nil,Nil); end end; with AxG2antt1 do begin BeginUpdate(); VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAAEhABOUGACAADACAxRDgMQBQKAAzAJBIYhiG4cYCgMZhXDOCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADCMQwAFBIbhrE4ZBjHGQRUgyI43RhHUBzVI' + 'UBxDEaTZLlEYJBgeHYhDJPcaUVDcWQHGyeZwjSgpKoWSJIU5NcggPDgEwTKCmKlTAKoSzJMyEmwWRAdVTZLSEaxierKPhyWT/XgAF4PfDFKRXFqXY5mKZJFqKOI8TxIN' + 'gxPQMGyrBqraLqKwQGrGCQKSBhUZ3dS2JR3OSlYRuQAMVgOXoDZhPWZXbDtSzPE63NgtOR5DiGWalABoeoxRa9cz3ViCJSrGTqIoINIzZLHFQbPpdAYdP6BeIjXhhZxB' + 'BuLZXmEOh9CcNoni2N4MjWVodh+DpfBeLJinsWR9AyYwVAkGBhEAFphGiRogDEGBamkFgtjcZgHiMbgehYaQhAIEIREAaQYkcQZUHIGRUGQDBOEaBAhDYDxGkMZAkCge' + 'oagYZAYEYAYIAWGhemICIFj8WIiCiFR5gkIhogmBoKGKJx2C6C5hniMgggqYwog0UoNGMZJiDiCZRgOLY0ECUAQICA=='); with Chart do begin LevelCount := 2; FirstVisibleDate := '12/2/2017'; PaneWidth[False] := 342; with Bars.Item['Summary'] do begin StartShape := EXG2ANTTLib.ShapeCornerEnum.exShapeIconEmpty; EndShape := EXG2ANTTLib.ShapeCornerEnum.exShapeIconEmpty; Shape := EXG2ANTTLib.ShapeBarEnum.exShapeSolid; Color := $1000000; Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<%=%513%>'; Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18); end; end; with Columns do begin Add('C1'); Add('C2'); Add('C3'); with (Add('Pos') as EXG2ANTTLib.Column) do begin FormatColumn := '1 pos ``'; AllowGroupBy := False; Position := 0; Width := 48; AllowSizing := False; end; end; SortBarVisible := True; SortBarCaption := 'Drag a <b>column</b> header here to group by that column.'; AllowGroupBy := True; HasLines := EXG2ANTTLib.HierarchyLineEnum.exNoLine; LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exNoLinesAtRoot; with Items do begin h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; CellValue[TObject(h),TObject(2)] := 'SubItem A.2'; h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; CellValue[TObject(h),TObject(2)] := 'SubItem A.2'; h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; CellValue[TObject(h),TObject(2)] := 'SubItem A.2'; h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; CellValue[TObject(h),TObject(2)] := 'SubItem A.2'; h := AddItem('Item B'); CellValue[TObject(h),TObject(1)] := 'SubItem B.1'; CellValue[TObject(h),TObject(2)] := 'SubItem B.2'; h := AddItem('Item B'); CellValue[TObject(h),TObject(1)] := 'SubItem B.1'; CellValue[TObject(h),TObject(2)] := 'SubItem B.2'; end; with Columns.Item[TObject(0)] do begin SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending; end; EndUpdate(); end |
2026 |
Is it possible to display no +/- button for grouped items
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddGroupItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddGroupItemEvent); begin with AxG2antt1 do begin with Items do begin ItemDividerLine[e.item] := EXG2ANTTLib.DividerLineEnum.EmptyLine; AddBar(e.item,'Progress','12/2/2017','12/2/2017',Nil,Nil); DefineSummaryBars(e.item,'',-3,''); l := GroupItem[e.item]; CellSingleLine[TObject(e.item),TObject(l)] := EXG2ANTTLib.CellSingleLineEnum.exCaptionWordWrap; CellBold[TObject(e.item),TObject(l)] := True; ItemBackColor[e.item] := $bebebe; end; Chart.ItemBackColor[e.item] := $bebebe; end end; // AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin Items.AddBar(e.item,'Task','12/4/2017','12/10/2017',Nil,Nil); end end; with AxG2antt1 do begin BeginUpdate(); with Chart do begin LevelCount := 2; FirstVisibleDate := '12/2/2017'; PaneWidth[False] := 342; end; with Columns do begin Add('C1'); Add('C2'); Add('C3'); with (Add('Pos') as EXG2ANTTLib.Column) do begin FormatColumn := '1 pos ``'; AllowGroupBy := False; Position := 0; Width := 48; AllowSizing := False; end; end; SortBarVisible := True; SortBarCaption := 'Drag a <b>column</b> header here to group by that column.'; AllowGroupBy := True; HasLines := EXG2ANTTLib.HierarchyLineEnum.exNoLine; LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exNoLinesAtRoot; with Items do begin h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; CellValue[TObject(h),TObject(2)] := 'SubItem A.2'; h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; CellValue[TObject(h),TObject(2)] := 'SubItem A.2'; h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; CellValue[TObject(h),TObject(2)] := 'SubItem A.2'; h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; CellValue[TObject(h),TObject(2)] := 'SubItem A.2'; h := AddItem('Item B'); CellValue[TObject(h),TObject(1)] := 'SubItem B.1'; CellValue[TObject(h),TObject(2)] := 'SubItem B.2'; h := AddItem('Item B'); CellValue[TObject(h),TObject(1)] := 'SubItem B.1'; CellValue[TObject(h),TObject(2)] := 'SubItem B.2'; end; with Columns.Item[TObject(0)] do begin SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending; Alignment := EXG2ANTTLib.AlignmentEnum.CenterAlignment; Def[EXG2ANTTLib.DefColumnEnum.exCellBackColor] := TObject(15790320); end; EndUpdate(); end |
2025 |
How can I change the label, caption or the formula of the grouped items
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddGroupItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddGroupItemEvent); begin with AxG2antt1 do begin with Items do begin AddBar(e.item,'Progress','12/2/2017','12/2/2017',Nil,Nil); DefineSummaryBars(e.item,'',-3,''); end; end end; // AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin Items.AddBar(e.item,'Task','12/4/2017','12/10/2017',Nil,Nil); end end; with AxG2antt1 do begin BeginUpdate(); with Chart do begin LevelCount := 2; FirstVisibleDate := '12/2/2017'; PaneWidth[False] := 342; end; with Columns do begin with (Add('C1') as EXG2ANTTLib.Column) do begin GroupByTotalField := ''; GroupByFormatCell := 'upper(value)'; end; Add('C2'); Add('C3'); with (Add('Pos') as EXG2ANTTLib.Column) do begin FormatColumn := '1 pos ``'; AllowGroupBy := False; Position := 0; Width := 48; AllowSizing := False; end; end; SortBarVisible := True; SortBarCaption := 'Drag a <b>column</b> header here to group by that column.'; AllowGroupBy := True; with Items do begin h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; CellValue[TObject(h),TObject(2)] := 'SubItem A.2'; h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; CellValue[TObject(h),TObject(2)] := 'SubItem A.2'; h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; CellValue[TObject(h),TObject(2)] := 'SubItem A.2'; h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; CellValue[TObject(h),TObject(2)] := 'SubItem A.2'; h := AddItem('Item B'); CellValue[TObject(h),TObject(1)] := 'SubItem B.1'; CellValue[TObject(h),TObject(2)] := 'SubItem B.2'; h := AddItem('Item B'); CellValue[TObject(h),TObject(1)] := 'SubItem B.1'; CellValue[TObject(h),TObject(2)] := 'SubItem B.2'; end; Columns.Item[TObject(0)].SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending; EndUpdate(); end |
2024 |
How can I change the aspect of grouped items
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddGroupItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddGroupItemEvent); begin with AxG2antt1 do begin with Items do begin ItemDividerLine[e.item] := EXG2ANTTLib.DividerLineEnum.EmptyLine; AddBar(e.item,'Progress','12/2/2017','12/2/2017',Nil,Nil); DefineSummaryBars(e.item,'',-3,''); l := GroupItem[e.item]; CellSingleLine[TObject(e.item),TObject(l)] := EXG2ANTTLib.CellSingleLineEnum.exCaptionWordWrap; CellBold[TObject(e.item),TObject(l)] := True; ItemBackColor[e.item] := $bebebe; end; Chart.ItemBackColor[e.item] := $bebebe; end end; // AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin Items.AddBar(e.item,'Task','12/4/2017','12/10/2017',Nil,Nil); end end; with AxG2antt1 do begin BeginUpdate(); with Chart do begin LevelCount := 2; FirstVisibleDate := '12/2/2017'; PaneWidth[False] := 342; end; with Columns do begin Add('C1'); Add('C2'); Add('C3'); with (Add('Pos') as EXG2ANTTLib.Column) do begin FormatColumn := '1 pos ``'; AllowGroupBy := False; Position := 0; Width := 48; AllowSizing := False; end; end; SortBarVisible := True; SortBarCaption := 'Drag a <b>column</b> header here to group by that column.'; AllowGroupBy := True; with Items do begin h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; CellValue[TObject(h),TObject(2)] := 'SubItem A.2'; h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; CellValue[TObject(h),TObject(2)] := 'SubItem A.2'; h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; CellValue[TObject(h),TObject(2)] := 'SubItem A.2'; h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; CellValue[TObject(h),TObject(2)] := 'SubItem A.2'; h := AddItem('Item B'); CellValue[TObject(h),TObject(1)] := 'SubItem B.1'; CellValue[TObject(h),TObject(2)] := 'SubItem B.2'; h := AddItem('Item B'); CellValue[TObject(h),TObject(1)] := 'SubItem B.1'; CellValue[TObject(h),TObject(2)] := 'SubItem B.2'; end; Columns.Item[TObject(0)].SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending; EndUpdate(); end |
2023 |
How can I collapse all items when the user performs a grouping
// AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddGroupItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddGroupItemEvent); begin with AxG2antt1 do begin with Items do begin ExpandItem[e.item] := False; ItemDividerLine[e.item] := EXG2ANTTLib.DividerLineEnum.EmptyLine; AddBar(e.item,'Progress','12/2/2017','12/2/2017',Nil,Nil); DefineSummaryBars(e.item,'',-3,''); end; end end; // AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin Items.AddBar(e.item,'Task','12/4/2017','12/10/2017',Nil,Nil); end end; with AxG2antt1 do begin BeginUpdate(); with Chart do begin LevelCount := 2; FirstVisibleDate := '12/2/2017'; PaneWidth[False] := 342; end; with Columns do begin Add('C1'); Add('C2'); Add('C3'); with (Add('Pos') as EXG2ANTTLib.Column) do begin FormatColumn := '1 pos ``'; AllowGroupBy := False; Position := 0; Width := 48; AllowSizing := False; end; end; SortBarVisible := True; SortBarCaption := 'Drag a <b>column</b> header here to group by that column.'; AllowGroupBy := True; with Items do begin h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; CellValue[TObject(h),TObject(2)] := 'SubItem A.2'; h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; CellValue[TObject(h),TObject(2)] := 'SubItem A.2'; h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; CellValue[TObject(h),TObject(2)] := 'SubItem A.2'; h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; CellValue[TObject(h),TObject(2)] := 'SubItem A.2'; h := AddItem('Item B'); CellValue[TObject(h),TObject(1)] := 'SubItem B.1'; CellValue[TObject(h),TObject(2)] := 'SubItem B.2'; h := AddItem('Item B'); CellValue[TObject(h),TObject(1)] := 'SubItem B.1'; CellValue[TObject(h),TObject(2)] := 'SubItem B.2'; end; Columns.Item[TObject(0)].SortOrder := EXG2ANTTLib.SortOrderEnum.SortAscending; EndUpdate(); end |
2022 |
Is it possible to select columns that user can drop to the sort bar, when using the Group By feature
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin Items.AddBar(e.item,'Task','12/4/2017','12/10/2017',Nil,Nil); end end; with AxG2antt1 do begin BeginUpdate(); with Chart do begin LevelCount := 2; FirstVisibleDate := '12/2/2017'; PaneWidth[False] := 342; end; with Columns do begin Add('C1'); Add('C2'); Add('C3'); with (Add('Pos') as EXG2ANTTLib.Column) do begin FormatColumn := '1 pos ``'; AllowGroupBy := False; Position := 0; Width := 48; AllowSizing := False; end; end; SortBarVisible := True; SortBarCaption := '<fgcolor=FF0000>Try to drag the Pos column here.'; AllowGroupBy := True; with Items do begin h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; CellValue[TObject(h),TObject(2)] := 'SubItem A.2'; h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; CellValue[TObject(h),TObject(2)] := 'SubItem A.2'; h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; CellValue[TObject(h),TObject(2)] := 'SubItem A.2'; h := AddItem('Item A'); CellValue[TObject(h),TObject(1)] := 'SubItem A.1'; CellValue[TObject(h),TObject(2)] := 'SubItem A.2'; h := AddItem('Item B'); CellValue[TObject(h),TObject(1)] := 'SubItem B.1'; CellValue[TObject(h),TObject(2)] := 'SubItem B.2'; h := AddItem('Item B'); CellValue[TObject(h),TObject(1)] := 'SubItem B.1'; CellValue[TObject(h),TObject(2)] := 'SubItem B.2'; end; EndUpdate(); end |
2021 |
How can I filter for the type of the bars I have in my chart
with AxG2antt1 do begin BeginUpdate(); with Chart do begin LevelCount := 2; FirstVisibleDate := '11/28/2017'; PaneWidth[False] := 0; with Bars.Item['Task'] do begin Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<%=%0%>'; Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18); end; with Bars.Copy('Task','GTask') do begin Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<%=%0%>'; Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18); Color := $ff00; end; with Bars.Copy('Task','RTask') do begin Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption] := '<%=%0%>'; Def[EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption] := TObject(18); Color := $ff; end; ColumnsFormatLevel := '0'; end; OnResizeControl := Integer(EXG2ANTTLib.OnResizeControlEnum.exDisableSplitter) Or Integer(EXG2ANTTLib.OnResizeControlEnum.exResizeChart); with (Columns.Add('Default') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsAsc); end; with (Columns.Add('Type') as EXG2ANTTLib.Column) do begin Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarKey] := ''; Def[EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty] := TObject(0); Visible := False; DisplayFilterButton := True; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsAsc); end; with Items do begin AllowCellValueToItemBar := True; AddBar(AddItem('Item 1'),'Task','12/4/2017','12/12/2017',Nil,Nil); AddBar(AddItem('Item 2'),'GTask','12/4/2017','12/12/2017',Nil,Nil); AddBar(AddItem('Item 3'),'RTask','12/4/2017','12/12/2017',Nil,Nil); AddBar(AddItem('Item 4'),'Task','12/4/2017','12/12/2017',Nil,Nil); AddBar(AddItem('Item 5'),'GTask','12/4/2017','12/12/2017',Nil,Nil); AddBar(AddItem('Item 6'),'RTask','12/4/2017','12/12/2017',Nil,Nil); end; FilterBarFont := (Font as stdole.StdFont); set_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarAnd,FormatABC('`<fgcolor=808080> ` + value + ` </fgcolor>`',TObject(get_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarAnd)),Nil,Nil)); FilterBarCaption := '(( ( all replace `[<b>` with `<bgcolor=000000><fgcolor=FFFFFF><b> ` replace `</b>]` with ` </b></bgcolor></fgcolor>` replace `[<' + 's>` with `<bgcolor=C0C0C0><fgcolor=FFFFFF> ` replace `</s>]` with ` </fgcolor></bgcolor>` ) + `<r><fgcolor=808080>` + ( matchit' + 'emcount < 0 ? ( ( len(value) ? `` : `` ) + `<r>` + abs(matchitemcount + 1) + ` result(s)` ) : (`<r><fgcolor=808080>`+ itemcount ' + '+ ` item(s)`) )))'; FilterBarPromptVisible := Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarCompact) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarShowCloseIfRequired) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarSingleLine) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarVisible) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarPromptVisible); with Columns.Item[TObject(1)] do begin FilterType := EXG2ANTTLib.FilterTypeEnum.exFilter; Filter := 'GTask|RTask'; end; ApplyFilter(); EndUpdate(); end |
2020 |
How can I display the control's filter bar in the Items section only, as it was displayed before
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin Items.AddBar(e.item,'Task','12/4/2017','12/14/2017',Nil,Nil); end end; with AxG2antt1 do begin BeginUpdate(); with Chart do begin LevelCount := 2; FirstVisibleDate := '12/2/2017'; PaneWidth[False] := 256; end; with (Columns.Add('Col-1') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsAsc); end; with (Columns.Add('Col-2') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsAsc); end; with (Columns.Add('Pos') as EXG2ANTTLib.Column) do begin AllowSizing := False; AllowSort := False; Width := 32; FormatColumn := '1 apos ``'; Position := 0; end; with Items do begin CellValue[TObject(AddItem('Item A')),TObject(1)] := 'Sub-Item A'; CellValue[TObject(AddItem('Item B')),TObject(1)] := 'Sub-Item B'; CellValue[TObject(AddItem('Item C')),TObject(1)] := 'Sub-Item C'; end; FilterBarPromptVisible := EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarShort; with Columns.Item[TObject(1)] do begin FilterType := EXG2ANTTLib.FilterTypeEnum.exPattern; Filter := '*B'; end; ApplyFilter(); EndUpdate(); end |
2019 |
FilterBarCaption ALL Keyword ( sample 2, result )
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin i := FormatABC('value + 1',Items.ItemToIndex[e.item],Nil,Nil); Items.CellImage[TObject(e.item),TObject(3)] := i; Items.AddBar(e.item,'Task','12/4/2017','12/14/2017',Nil,Nil); end end; with AxG2antt1 do begin BeginUpdate(); with Chart do begin LevelCount := 2; FirstVisibleDate := '12/2/2017'; PaneWidth[False] := 256; end; Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA='); with (Columns.Add('Col-1') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsAsc); end; with (Columns.Add('Col-2') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsAsc); end; with (Columns.Add('Check') as EXG2ANTTLib.Column) do begin with Editor do begin EditType := EXG2ANTTLib.EditTypeEnum.CheckValueType; Option[EXG2ANTTLib.EditorOptionEnum.exCheckValue2] := TObject(1); end; DisplayFilterButton := True; DisplayFilterPattern := False; FilterType := EXG2ANTTLib.FilterTypeEnum.exCheck; end; with (Columns.Add('Image') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterType := EXG2ANTTLib.FilterTypeEnum.exImage; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox); end; with (Columns.Add('Pos') as EXG2ANTTLib.Column) do begin AllowSizing := False; AllowSort := False; Width := 32; FormatColumn := '1 apos ``'; Position := 0; end; with Items do begin CellValue[TObject(AddItem('Item A')),TObject(1)] := 'Sub-Item A'; h := AddItem('Item B'); CellValue[TObject(h),TObject(1)] := 'Sub-Item B'; CellState[TObject(h),TObject(2)] := 1; CellValue[TObject(AddItem('Item C')),TObject(1)] := 'Sub-Item C'; end; FilterBarFont := (Font as stdole.StdFont); set_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarAnd,FormatABC('`<fgcolor=808080> ` + value + ` </fgcolor>`',TObject(get_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarAnd)),Nil,Nil)); FilterBarCaption := '(( ( all replace `[<b>` with `<bgcolor=000000><fgcolor=FFFFFF><b> ` replace `</b>]` with ` </b></bgcolor></fgcolor>` replace `[<' + 's>` with `<bgcolor=C0C0C0><fgcolor=FFFFFF> ` replace `</s>]` with ` </fgcolor></bgcolor>` ) + `<r><fgcolor=808080>` + ( matchit' + 'emcount < 0 ? ( ( len(value) ? `` : `` ) + `<r>` + abs(matchitemcount + 1) + ` result(s)` ) : (`<r><fgcolor=808080>`+ itemcount ' + '+ ` item(s)`) )))'; FilterBarPromptVisible := Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarVisible) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarPromptVisible); with Columns.Item[TObject(0)] do begin FilterType := EXG2ANTTLib.FilterTypeEnum.exFilter; Filter := 'Item A|Item B'; end; Columns.Item[TObject(2)].Filter := 1; ApplyFilter(); EndUpdate(); end |
2018 |
FilterBarCaption ALL Keyword ( sample 1 )
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin i := FormatABC('value + 1',Items.ItemToIndex[e.item],Nil,Nil); Items.CellImage[TObject(e.item),TObject(3)] := i; Items.AddBar(e.item,'Task','12/4/2017','12/14/2017',Nil,Nil); end end; with AxG2antt1 do begin BeginUpdate(); with Chart do begin LevelCount := 2; FirstVisibleDate := '12/2/2017'; PaneWidth[False] := 256; end; Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA='); with (Columns.Add('Col-1') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsAsc); end; with (Columns.Add('Col-2') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsAsc); end; with (Columns.Add('Check') as EXG2ANTTLib.Column) do begin with Editor do begin EditType := EXG2ANTTLib.EditTypeEnum.CheckValueType; Option[EXG2ANTTLib.EditorOptionEnum.exCheckValue2] := TObject(1); end; DisplayFilterButton := True; DisplayFilterPattern := False; FilterType := EXG2ANTTLib.FilterTypeEnum.exCheck; end; with (Columns.Add('Image') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterType := EXG2ANTTLib.FilterTypeEnum.exImage; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox); end; with (Columns.Add('Pos') as EXG2ANTTLib.Column) do begin AllowSizing := False; AllowSort := False; Width := 32; FormatColumn := '1 apos ``'; Position := 0; end; with Items do begin CellValue[TObject(AddItem('Item A')),TObject(1)] := 'Sub-Item A'; h := AddItem('Item B'); CellValue[TObject(h),TObject(1)] := 'Sub-Item B'; CellState[TObject(h),TObject(2)] := 1; CellValue[TObject(AddItem('Item C')),TObject(1)] := 'Sub-Item C'; end; FilterBarFont := (Font as stdole.StdFont); set_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarAnd,FormatABC('`<fgcolor=808080> ` + value + ` </fgcolor>`',TObject(get_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarAnd)),Nil,Nil)); FilterBarCaption := 'all'; FilterBarPromptVisible := Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarVisible) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarPromptVisible); with Columns.Item[TObject(0)] do begin FilterType := EXG2ANTTLib.FilterTypeEnum.exFilter; Filter := 'Item A|Item B'; end; Columns.Item[TObject(2)].Filter := 1; ApplyFilter(); EndUpdate(); end |
2017 |
FilterBarCaption ALLUI Keyword ( sample 2, result )
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin i := FormatABC('value + 1',Items.ItemToIndex[e.item],Nil,Nil); Items.CellImage[TObject(e.item),TObject(3)] := i; Items.AddBar(e.item,'Task','12/4/2017','12/14/2017',Nil,Nil); end end; with AxG2antt1 do begin BeginUpdate(); with Chart do begin LevelCount := 2; FirstVisibleDate := '12/2/2017'; PaneWidth[False] := 256; end; Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA='); with (Columns.Add('Col-1') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsAsc); end; with (Columns.Add('Col-2') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsAsc); end; with (Columns.Add('Check') as EXG2ANTTLib.Column) do begin with Editor do begin EditType := EXG2ANTTLib.EditTypeEnum.CheckValueType; Option[EXG2ANTTLib.EditorOptionEnum.exCheckValue2] := TObject(1); end; DisplayFilterButton := True; DisplayFilterPattern := False; FilterType := EXG2ANTTLib.FilterTypeEnum.exCheck; end; with (Columns.Add('Image') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterType := EXG2ANTTLib.FilterTypeEnum.exImage; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox); end; with (Columns.Add('Pos') as EXG2ANTTLib.Column) do begin AllowSizing := False; AllowSort := False; Width := 32; FormatColumn := '1 apos ``'; Position := 0; end; with Items do begin CellValue[TObject(AddItem('Item A')),TObject(1)] := 'Sub-Item A'; h := AddItem('Item B'); CellValue[TObject(h),TObject(1)] := 'Sub-Item B'; CellState[TObject(h),TObject(2)] := 1; CellValue[TObject(AddItem('Item C')),TObject(1)] := 'Sub-Item C'; end; FilterBarFont := (Font as stdole.StdFont); set_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarAnd,FormatABC('`<fgcolor=808080> ` + value + ` </fgcolor>`',TObject(get_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarAnd)),Nil,Nil)); FilterBarCaption := '(( ( allui replace `[<b>` with `<bgcolor=000000><fgcolor=FFFFFF><b> ` replace `</b>]` with ` </b></bgcolor></fgcolor>` replace `' + '[<s>` with `<bgcolor=C0C0C0><fgcolor=FFFFFF> ` replace `</s>]` with ` </fgcolor></bgcolor>` ) + `<r><fgcolor=808080>` + ( match' + 'itemcount < 0 ? ( ( len(value) ? `` : `` ) + `<r>` + abs(matchitemcount + 1) + ` result(s)` ) : (`<r><fgcolor=808080>`+ itemcoun' + 't + ` item(s)`) )))'; FilterBarPromptVisible := Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarVisible) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarPromptVisible); with Columns.Item[TObject(0)] do begin FilterType := EXG2ANTTLib.FilterTypeEnum.exFilter; Filter := 'Item A|Item B'; end; Columns.Item[TObject(2)].Filter := 1; ApplyFilter(); EndUpdate(); end |
2016 |
FilterBarCaption ALLUI Keyword ( sample 1 )
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin i := FormatABC('value + 1',Items.ItemToIndex[e.item],Nil,Nil); Items.CellImage[TObject(e.item),TObject(3)] := i; Items.AddBar(e.item,'Task','12/4/2017','12/14/2017',Nil,Nil); end end; with AxG2antt1 do begin BeginUpdate(); with Chart do begin LevelCount := 2; FirstVisibleDate := '12/2/2017'; PaneWidth[False] := 256; end; Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA='); with (Columns.Add('Col-1') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsAsc); end; with (Columns.Add('Col-2') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsAsc); end; with (Columns.Add('Check') as EXG2ANTTLib.Column) do begin with Editor do begin EditType := EXG2ANTTLib.EditTypeEnum.CheckValueType; Option[EXG2ANTTLib.EditorOptionEnum.exCheckValue2] := TObject(1); end; DisplayFilterButton := True; DisplayFilterPattern := False; FilterType := EXG2ANTTLib.FilterTypeEnum.exCheck; end; with (Columns.Add('Image') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterType := EXG2ANTTLib.FilterTypeEnum.exImage; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox); end; with (Columns.Add('Pos') as EXG2ANTTLib.Column) do begin AllowSizing := False; AllowSort := False; Width := 32; FormatColumn := '1 apos ``'; Position := 0; end; with Items do begin CellValue[TObject(AddItem('Item A')),TObject(1)] := 'Sub-Item A'; h := AddItem('Item B'); CellValue[TObject(h),TObject(1)] := 'Sub-Item B'; CellState[TObject(h),TObject(2)] := 1; CellValue[TObject(AddItem('Item C')),TObject(1)] := 'Sub-Item C'; end; FilterBarFont := (Font as stdole.StdFont); set_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarAnd,FormatABC('`<fgcolor=808080> ` + value + ` </fgcolor>`',TObject(get_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarAnd)),Nil,Nil)); FilterBarCaption := 'allui'; FilterBarPromptVisible := Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarVisible) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarPromptVisible); with Columns.Item[TObject(0)] do begin FilterType := EXG2ANTTLib.FilterTypeEnum.exFilter; Filter := 'Item A|Item B'; end; Columns.Item[TObject(2)].Filter := 1; ApplyFilter(); EndUpdate(); end |
2015 |
FilterBarCaption AVAILABLE Keyword ( sample 2, result )
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin i := FormatABC('value + 1',Items.ItemToIndex[e.item],Nil,Nil); Items.CellImage[TObject(e.item),TObject(3)] := i; Items.AddBar(e.item,'Task','12/4/2017','12/14/2017',Nil,Nil); end end; with AxG2antt1 do begin BeginUpdate(); with Chart do begin LevelCount := 2; FirstVisibleDate := '12/2/2017'; PaneWidth[False] := 256; end; Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA='); with (Columns.Add('Col-1') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsAsc); end; with (Columns.Add('Col-2') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsAsc); end; with (Columns.Add('Check') as EXG2ANTTLib.Column) do begin with Editor do begin EditType := EXG2ANTTLib.EditTypeEnum.CheckValueType; Option[EXG2ANTTLib.EditorOptionEnum.exCheckValue2] := TObject(1); end; DisplayFilterButton := True; DisplayFilterPattern := False; FilterType := EXG2ANTTLib.FilterTypeEnum.exCheck; end; with (Columns.Add('Image') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterType := EXG2ANTTLib.FilterTypeEnum.exImage; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox); end; with (Columns.Add('Pos') as EXG2ANTTLib.Column) do begin AllowSizing := False; AllowSort := False; Width := 32; FormatColumn := '1 apos ``'; Position := 0; end; with Items do begin CellValue[TObject(AddItem('Item A')),TObject(1)] := 'Sub-Item A'; h := AddItem('Item B'); CellValue[TObject(h),TObject(1)] := 'Sub-Item B'; CellState[TObject(h),TObject(2)] := 1; CellValue[TObject(AddItem('Item C')),TObject(1)] := 'Sub-Item C'; end; FilterBarFont := (Font as stdole.StdFont); set_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarAnd,FormatABC('`<fgcolor=808080> ` + value + ` </fgcolor>`',TObject(get_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarAnd)),Nil,Nil)); FilterBarCaption := '(( ( value replace `[` with `<bgcolor=000000><fgcolor=FFFFFF><b> ` replace `]` with ` </b></bgcolor></fgcolor>` ) + ` ` + ( avai' + 'lable replace `[` with `<bgcolor=C0C0C0><fgcolor=FFFFFF><b> ` replace `]` with ` </b></bgcolor></fgcolor>` replace `<s>` with ``' + ' replace `</s>` with `` ) + `<fgcolor=808080>` + ( matchitemcount < 0 ? ( ( len(value) ? `` : `` ) + `<r>` + abs(matchitemcount ' + '+ 1) + ` result(s)` ) : (`<r><fgcolor=808080>`+ itemcount + ` item(s)`) )))'; FilterBarPromptVisible := Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarVisible) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarPromptVisible); with Columns.Item[TObject(0)] do begin FilterType := EXG2ANTTLib.FilterTypeEnum.exFilter; Filter := 'Item A|Item B'; end; Columns.Item[TObject(2)].Filter := 1; ApplyFilter(); EndUpdate(); end |
2014 |
FilterBarCaption AVAILABLE Keyword ( sample 1 )
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin i := FormatABC('value + 1',Items.ItemToIndex[e.item],Nil,Nil); Items.CellImage[TObject(e.item),TObject(3)] := i; Items.AddBar(e.item,'Task','12/4/2017','12/14/2017',Nil,Nil); end end; with AxG2antt1 do begin BeginUpdate(); with Chart do begin LevelCount := 2; FirstVisibleDate := '12/2/2017'; PaneWidth[False] := 256; end; Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA='); with (Columns.Add('Col-1') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsAsc); end; with (Columns.Add('Col-2') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsAsc); end; with (Columns.Add('Check') as EXG2ANTTLib.Column) do begin with Editor do begin EditType := EXG2ANTTLib.EditTypeEnum.CheckValueType; Option[EXG2ANTTLib.EditorOptionEnum.exCheckValue2] := TObject(1); end; DisplayFilterButton := True; DisplayFilterPattern := False; FilterType := EXG2ANTTLib.FilterTypeEnum.exCheck; end; with (Columns.Add('Image') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterType := EXG2ANTTLib.FilterTypeEnum.exImage; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox); end; with (Columns.Add('Pos') as EXG2ANTTLib.Column) do begin AllowSizing := False; AllowSort := False; Width := 32; FormatColumn := '1 apos ``'; Position := 0; end; with Items do begin CellValue[TObject(AddItem('Item A')),TObject(1)] := 'Sub-Item A'; h := AddItem('Item B'); CellValue[TObject(h),TObject(1)] := 'Sub-Item B'; CellState[TObject(h),TObject(2)] := 1; CellValue[TObject(AddItem('Item C')),TObject(1)] := 'Sub-Item C'; end; FilterBarFont := (Font as stdole.StdFont); set_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarAnd,FormatABC('`<fgcolor=808080> ` + value + ` </fgcolor>`',TObject(get_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarAnd)),Nil,Nil)); FilterBarCaption := 'value + ` ` + available'; FilterBarPromptVisible := Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarVisible) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarPromptVisible); with Columns.Item[TObject(0)] do begin FilterType := EXG2ANTTLib.FilterTypeEnum.exFilter; Filter := 'Item A|Item B'; end; Columns.Item[TObject(2)].Filter := 1; ApplyFilter(); EndUpdate(); end |
2013 |
Is it possible to somehow highlight the column's name different than its filter value in the control's filter bar ( sample 3, results )
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin Items.AddBar(e.item,'Task','12/4/2017','12/14/2017',Nil,Nil); end end; with AxG2antt1 do begin BeginUpdate(); with Chart do begin LevelCount := 2; FirstVisibleDate := '12/2/2017'; PaneWidth[False] := 256; end; with (Columns.Add('Col-1') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsAsc); end; with (Columns.Add('Col-2') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsAsc); end; with (Columns.Add('Pos') as EXG2ANTTLib.Column) do begin AllowSizing := False; AllowSort := False; Width := 32; FormatColumn := '1 apos ``'; Position := 0; end; with Items do begin CellValue[TObject(AddItem('Item A')),TObject(1)] := 'Sub-Item A'; CellValue[TObject(AddItem('Item B')),TObject(1)] := 'Sub-Item B'; CellValue[TObject(AddItem('Item C')),TObject(1)] := 'Sub-Item C'; end; FilterBarFont := (Font as stdole.StdFont); set_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarAnd,FormatABC('`<fgcolor=808080>` + value + `</fgcolor>`',TObject(get_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarAnd)),Nil,Nil)); FilterBarCaption := '(`<b>` + value + `</b><fgcolor=808080>` + ( matchitemcount < 0 ? ( ( len(value) ? `` : `` ) + `<r>` + abs(matchitemcount + 1) + ' + '` result(s)` ) : (`<fgcolor=808080>`+ itemcount + ` item(s)`) )) replace `[` with `<bgcolor=000000><fgcolor=FFFFFF><b> ` replace' + ' `]` with ` </b></bgcolor></fgcolor>`'; FilterBarPromptVisible := EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarToggle; with Columns.Item[TObject(0)] do begin FilterType := EXG2ANTTLib.FilterTypeEnum.exFilter; Filter := 'Item A|Item B'; end; with Columns.Item[TObject(1)] do begin FilterType := EXG2ANTTLib.FilterTypeEnum.exPattern; Filter := '*B'; end; ApplyFilter(); EndUpdate(); end |
2012 |
Is it possible to somehow highlight the column's name different than its filter value in the control's filter bar ( sample 2 )
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin Items.AddBar(e.item,'Task','12/4/2017','12/14/2017',Nil,Nil); end end; with AxG2antt1 do begin BeginUpdate(); with Chart do begin LevelCount := 2; FirstVisibleDate := '12/2/2017'; PaneWidth[False] := 256; end; with (Columns.Add('Col-1') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsAsc); end; with (Columns.Add('Col-2') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsAsc); end; with (Columns.Add('Pos') as EXG2ANTTLib.Column) do begin AllowSizing := False; AllowSort := False; Width := 32; FormatColumn := '1 apos ``'; Position := 0; end; with Items do begin CellValue[TObject(AddItem('Item A')),TObject(1)] := 'Sub-Item A'; CellValue[TObject(AddItem('Item B')),TObject(1)] := 'Sub-Item B'; CellValue[TObject(AddItem('Item C')),TObject(1)] := 'Sub-Item C'; end; FilterBarFont := (Font as stdole.StdFont); set_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarAnd,FormatABC('`<fgcolor=808080>` + value + `</fgcolor>`',TObject(get_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarAnd)),Nil,Nil)); FilterBarCaption := 'value replace `[` with `<bgcolor=000000><fgcolor=FFFFFF><b> ` replace `]` with ` </b></bgcolor></fgcolor>`'; FilterBarPromptVisible := EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarToggle; with Columns.Item[TObject(0)] do begin FilterType := EXG2ANTTLib.FilterTypeEnum.exFilter; Filter := 'Item A|Item B'; end; with Columns.Item[TObject(1)] do begin FilterType := EXG2ANTTLib.FilterTypeEnum.exPattern; Filter := '*B'; end; ApplyFilter(); EndUpdate(); end |
2011 |
Is it possible to somehow highlight the column's name different than its filter value in the control's filter bar ( sample 1 )
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin Items.AddBar(e.item,'Task','12/4/2017','12/14/2017',Nil,Nil); end end; with AxG2antt1 do begin BeginUpdate(); with Chart do begin LevelCount := 2; FirstVisibleDate := '12/2/2017'; PaneWidth[False] := 256; end; with (Columns.Add('Col-1') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsAsc); end; with (Columns.Add('Col-2') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsAsc); end; with (Columns.Add('Pos') as EXG2ANTTLib.Column) do begin AllowSizing := False; AllowSort := False; Width := 32; FormatColumn := '1 apos ``'; Position := 0; end; with Items do begin CellValue[TObject(AddItem('Item A')),TObject(1)] := 'Sub-Item A'; CellValue[TObject(AddItem('Item B')),TObject(1)] := 'Sub-Item B'; CellValue[TObject(AddItem('Item C')),TObject(1)] := 'Sub-Item C'; end; set_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarAnd,FormatABC('`<fgcolor=808080>` + value + `</fgcolor>`',TObject(get_Description(EXG2ANTTLib.DescriptionTypeEnum.exFilterBarAnd)),Nil,Nil)); FilterBarCaption := 'value replace `[` with `<fgcolor=808080>[` replace `]` with `]</fgcolor>`'; FilterBarPromptVisible := EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarToggle; with Columns.Item[TObject(0)] do begin FilterType := EXG2ANTTLib.FilterTypeEnum.exFilter; Filter := 'Item A|Item B'; end; with Columns.Item[TObject(1)] do begin FilterType := EXG2ANTTLib.FilterTypeEnum.exPattern; Filter := '*B'; end; ApplyFilter(); EndUpdate(); end |
2010 |
Is it possible to automatically displays the control's filter label to the right
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin Items.AddBar(e.item,'Task','12/4/2017','12/14/2017',Nil,Nil); end end; with AxG2antt1 do begin BeginUpdate(); with Chart do begin LevelCount := 2; FirstVisibleDate := '12/2/2017'; PaneWidth[False] := 256; end; with (Columns.Add('Item') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsAsc); end; with (Columns.Add('Pos') as EXG2ANTTLib.Column) do begin AllowSizing := False; AllowSort := False; Width := 32; FormatColumn := '1 apos ``'; Position := 0; end; with Items do begin AddItem('Item A'); AddItem('Item B'); AddItem('Item C'); end; FilterBarCaption := '`<r>` + value'; FilterBarPromptVisible := Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarShowCloseOnRight) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarToggle); with Columns.Item[TObject(0)] do begin FilterType := EXG2ANTTLib.FilterTypeEnum.exFilter; Filter := 'Item B'; end; ApplyFilter(); EndUpdate(); end |
2009 |
How can I get the number of results/items being shown in the control's filter bar (sample 4)
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin Items.AddBar(e.item,'Task','12/4/2017','12/14/2017',Nil,Nil); end end; with AxG2antt1 do begin BeginUpdate(); with Chart do begin LevelCount := 2; FirstVisibleDate := '12/2/2017'; PaneWidth[False] := 256; end; with (Columns.Add('Item') as EXG2ANTTLib.Column) do begin DisplayFilterButton := True; FilterList := Integer(EXG2ANTTLib.FilterListEnum.exShowExclude) Or Integer(EXG2ANTTLib.FilterListEnum.exShowFocusItem) Or Integer(EXG2ANTTLib.FilterListEnum.exShowCheckBox) Or Integer(EXG2ANTTLib.FilterListEnum.exSortItemsAsc); end; with (Columns.Add('Pos') as EXG2ANTTLib.Column) do begin AllowSizing := False; AllowSort := False; Width := 32; FormatColumn := '1 apos ``'; Position := 0; end; with Items do begin AddItem('Item A'); AddItem('Item B'); AddItem('Item C'); end; FilterBarFont := (Font as stdole.StdFont); FilterBarPrompt := FormatABC('`<b>` + value',TObject(FilterBarPrompt),Nil,Nil); FilterBarCaption := '`<b><r>` + value + `</b><fgcolor=808080>` + ( matchitemcount < 0 ? ( ( len(value) ? `<br>` : `` ) + `<r>` + abs(matchitemcount +' + ' 1) + ` result(s)` ) : (`<fgcolor=808080>`+ itemcount + ` item(s)`) )'; FilterBarPromptVisible := Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarCompact) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarShowCloseOnRight) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarShowCloseIfRequired) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarCaptionVisible) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarVisible) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarPromptVisible); EndUpdate(); end |
2008 |
How can I get the number of results being shown in the control's filter bar (sample 3)
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin Items.AddBar(e.item,'Task','12/4/2017','12/14/2017',Nil,Nil); end end; with AxG2antt1 do begin BeginUpdate(); with Chart do begin LevelCount := 2; FirstVisibleDate := '12/2/2017'; PaneWidth[False] := 256; end; (Columns.Add('Item') as EXG2ANTTLib.Column).DisplayFilterButton := True; with (Columns.Add('Pos') as EXG2ANTTLib.Column) do begin AllowSizing := False; AllowSort := False; Width := 32; FormatColumn := '1 apos ``'; Position := 0; end; with Items do begin AddItem('Item A'); AddItem('Item B'); AddItem('Item C'); end; FilterBarFont := (Font as stdole.StdFont); FilterBarCaption := '`<b><r>` + value + `</b><fgcolor=808080>` + ( matchitemcount < 0 ? ( ( len(value) ? `<br>` : `` ) + `<r>` + abs(matchitemcount +' + ' 1) + ` result(s)` ) : ``)'; FilterBarPromptVisible := Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarCompact) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarCaptionVisible) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarVisible) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarPromptVisible); with Columns.Item[TObject(0)] do begin FilterType := EXG2ANTTLib.FilterTypeEnum.exFilter; Filter := 'Item A|Item B'; end; ApplyFilter(); EndUpdate(); end |
2007 |
How can I get the number of results being shown in the control's filter bar (sample 2, compact)
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin Items.AddBar(e.item,'Task','12/4/2017','12/14/2017',Nil,Nil); end end; with AxG2antt1 do begin BeginUpdate(); with Chart do begin LevelCount := 2; FirstVisibleDate := '12/2/2017'; PaneWidth[False] := 256; end; (Columns.Add('Item') as EXG2ANTTLib.Column).DisplayFilterButton := True; with (Columns.Add('Pos') as EXG2ANTTLib.Column) do begin AllowSizing := False; AllowSort := False; Width := 32; FormatColumn := '1 apos ``'; Position := 0; end; with Items do begin AddItem('Item A'); AddItem('Item B'); AddItem('Item C'); end; FilterBarFont := (Font as stdole.StdFont); FilterBarCaption := '`<b><r>` + value + `</b><fgcolor=808080>` + ( matchitemcount < 0 ? `<off -4> ` + abs(matchitemcount + 1) + ` result(s)` : ``)'; FilterBarPromptVisible := Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarCompact) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarSingleLine) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarCaptionVisible) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarVisible) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarPromptVisible); with Columns.Item[TObject(0)] do begin FilterType := EXG2ANTTLib.FilterTypeEnum.exFilter; Filter := 'Item A|Item B'; end; ApplyFilter(); EndUpdate(); end |
2006 |
How can I get the number of results being shown in the control's filter bar (sample 1)
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin Items.AddBar(e.item,'Task','12/4/2017','12/14/2017',Nil,Nil); end end; with AxG2antt1 do begin BeginUpdate(); with Chart do begin LevelCount := 2; FirstVisibleDate := '12/2/2017'; PaneWidth[False] := 256; end; (Columns.Add('Item') as EXG2ANTTLib.Column).DisplayFilterButton := True; with (Columns.Add('Pos') as EXG2ANTTLib.Column) do begin AllowSizing := False; AllowSort := False; Width := 32; FormatColumn := '1 apos ``'; Position := 0; end; with Items do begin AddItem('Item A'); AddItem('Item B'); AddItem('Item C'); end; FilterBarFont := (Font as stdole.StdFont); FilterBarCaption := '`<b>` + value + `</b><r><fgcolor=808080>` + ( matchitemcount < 0 ? abs(matchitemcount + 1) + ` result(s)` : ``)'; FilterBarPromptVisible := Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarCaptionVisible) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarVisible) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarPromptVisible); with Columns.Item[TObject(0)] do begin FilterType := EXG2ANTTLib.FilterTypeEnum.exFilter; Filter := 'Item A|Item B'; end; ApplyFilter(); EndUpdate(); end |
2005 |
FilterBarCaption Predefined Keywords
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin Items.AddBar(e.item,'Task','12/4/2017','12/14/2017',Nil,Nil); end end; // AfterExpandItem event - Fired after an item is expanded (collapsed). procedure TWinForm1.AxG2antt1_AfterExpandItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AfterExpandItemEvent); begin with AxG2antt1 do begin Refresh(); end end; with AxG2antt1 do begin BeginUpdate(); with Chart do begin LevelCount := 2; FirstVisibleDate := '12/2/2017'; PaneWidth[False] := 256; end; LinesAtRoot := EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; (Columns.Add('Item') as EXG2ANTTLib.Column).DisplayFilterButton := True; with (Columns.Add('Check') as EXG2ANTTLib.Column) do begin with Editor do begin EditType := EXG2ANTTLib.EditTypeEnum.CheckValueType; Option[EXG2ANTTLib.EditorOptionEnum.exCheckValue2] := TObject(1); end; DisplayFilterButton := True; DisplayFilterPattern := False; FilterType := EXG2ANTTLib.FilterTypeEnum.exCheck; end; with (Columns.Add('Pos') as EXG2ANTTLib.Column) do begin AllowSizing := False; AllowSort := False; Width := 32; FormatColumn := '1 apos ``'; Position := 0; end; with Items do begin AddItem('Item A'); h := AddItem('Item B'); CellState[TObject(InsertItem(h,Nil,'Sub-Item B1')),TObject(1)] := 1; InsertItem(h,Nil,'Sub-Item B2'); ExpandItem[h] := True; AddItem('Item C'); end; FilterInclude := EXG2ANTTLib.FilterIncludeEnum.exItemsWithChilds; FilterBarFont := (Font as stdole.StdFont); FilterBarCaption := '`<fgcolor=0000FF><i>value/current</i></fgcolor>: <fgcolor=808080>` + value + `</fgcolor>` + `<br><fgcolor=0000FF><i>available</i' + '></fgcolor>: ` + available + `<br><fgcolor=0000FF><i>allui</i></fgcolor>: ` + allui + `<br><fgcolor=0000FF><i>all</i></fgcolor>:' + ' ` + all + `<br><fgcolor=0000FF><i>itemcount</i></fgcolor>: <fgcolor=808080>` + itemcount + `</fgcolor>`+ `<br><fgcolor=0000FF><' + 'i>visibleitemcount</i></fgcolor>: <fgcolor=808080>` + visibleitemcount + `</fgcolor>`+ `<br><fgcolor=0000FF><i>matchitemcount</i' + '></fgcolor>: <fgcolor=808080>` + matchitemcount + `</fgcolor>`+ `<br><fgcolor=0000FF><i>promptpattern</i></fgcolor>: <fgcolor=80' + '8080>` + promptpattern + `</fgcolor>`+ `<br><fgcolor=0000FF><i>leafitemcount</i></fgcolor>: <fgcolor=808080>` + leafitemcount + ' + '`</fgcolor>`'; FilterBarPromptPattern := 'B'; FilterBarPromptVisible := Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarCaptionVisible) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarVisible) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarPromptVisible); with Columns.Item[TObject(0)] do begin FilterType := EXG2ANTTLib.FilterTypeEnum.exFilter; Filter := 'Item A|Item B'; end; ApplyFilter(); EndUpdate(); end |
2004 |
I am using filter prompt feature, and also column's filter, just wondering if possible to compact displaying the filter bar so it won't show on multiple lines
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin Items.AddBar(e.item,'Task','12/4/2017','12/14/2017',Nil,Nil); end end; with AxG2antt1 do begin BeginUpdate(); with Chart do begin LevelCount := 2; FirstVisibleDate := '12/2/2017'; PaneWidth[False] := 256; end; (Columns.Add('Item') as EXG2ANTTLib.Column).DisplayFilterButton := True; with (Columns.Add('Pos') as EXG2ANTTLib.Column) do begin AllowSizing := False; AllowSort := False; Width := 32; FormatColumn := '1 apos ``'; Position := 0; end; with Items do begin AddItem('Item A'); AddItem('Item B'); AddItem('Item C'); end; FilterBarFont := (Font as stdole.StdFont); FilterBarCaption := '`<r><i><fgcolor=808080><upline><solidline><sha ;;0>` + value'; FilterBarPromptPattern := 'B'; FilterBarPromptVisible := Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarCompact) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarSingleLine) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarVisible) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarPromptVisible); with Columns.Item[TObject(0)] do begin FilterType := EXG2ANTTLib.FilterTypeEnum.exFilter; Filter := 'Item A|Item B'; end; ApplyFilter(); EndUpdate(); end |
2003 |
Just wondering if it is possible to show the filter bar's close button on the right ( sample 2 )
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin Items.AddBar(e.item,'Task','12/4/2017','12/14/2017',Nil,Nil); end end; with AxG2antt1 do begin BeginUpdate(); with Chart do begin LevelCount := 2; FirstVisibleDate := '12/2/2017'; PaneWidth[False] := 256; end; (Columns.Add('Item') as EXG2ANTTLib.Column).DisplayFilterButton := True; with (Columns.Add('Pos') as EXG2ANTTLib.Column) do begin AllowSizing := False; AllowSort := False; Width := 32; FormatColumn := '1 apos ``'; Position := 0; end; with Items do begin AddItem('Item A'); AddItem('Item B'); AddItem('Item C'); end; FilterBarPromptVisible := Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarShowCloseOnRight) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarToggle) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarPromptVisible); FilterBarPrompt := FormatABC('`<r>` + value',TObject(FilterBarPrompt),Nil,Nil); EndUpdate(); end |
2002 |
Just wondering if it is possible to show the filter bar's close button on the right ( sample 1 )
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin Items.AddBar(e.item,'Task','12/4/2017','12/14/2017',Nil,Nil); end end; with AxG2antt1 do begin BeginUpdate(); with Chart do begin LevelCount := 2; FirstVisibleDate := '12/2/2017'; PaneWidth[False] := 256; end; RightToLeft := True; (Columns.Add('Item') as EXG2ANTTLib.Column).DisplayFilterButton := True; with (Columns.Add('Pos') as EXG2ANTTLib.Column) do begin AllowSizing := False; AllowSort := False; Width := 32; FormatColumn := '1 apos ``'; Position := 0; end; with Items do begin AddItem('Item A'); AddItem('Item B'); AddItem('Item C'); end; FilterBarPromptVisible := Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarToggle) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarPromptVisible); EndUpdate(); end |
2001 |
How can I change the visual appearance of the filter bar's close button (EBN)
// AddItem event - Occurs after a new Item has been inserted to Items collection. procedure TWinForm1.AxG2antt1_AddItem(sender: System.Object; e: AxEXG2ANTTLib._IG2anttEvents_AddItemEvent); begin with AxG2antt1 do begin Items.AddBar(e.item,'Task','12/4/2017','12/14/2017',Nil,Nil); end end; with AxG2antt1 do begin BeginUpdate(); with Chart do begin LevelCount := 2; FirstVisibleDate := '12/2/2017'; PaneWidth[False] := 256; end; with VisualAppearance do begin Add(1,'gBFLBCJwBAEHhEJAAEhABHQDg6AADACAxRDgMQBQKAAzAJBIYhiG4cYCgMZhXDOCYXABCEYRXBIZQ7BKNIxjSJ5BhIAAyDSJMjSRJUEhqGCWYDleYYYAKHIMQLOg7IJj' + 'yI4/SJAYCydKAWhxIaZKJHCZoEDaTAADCNVAQp6MEIJVbVEI0e79OgBLp/Z7kECIJJAaRjHQdJxGLA8EhtCQhCZteK6SgMKJYXhWQYRXI1JwvMBrWrdQjiOYELQtMKmS' + 'ZNLYGG4dR5SVJbcYhSYsRRFMoyDIOXYDLKsdYqSpXIThObEGgaPqJYjsUjCMKnR7HVIURrBPC9TBPE69ZgmC6ucKPX51ShKFaBWDZcwFAS+UBuYCAILiEAQGZ1XT8ORO' + 'icbgJgSTJRlCaZeDsHY7QGR4xkSYp3CaExZAQMgalQYAwjCAAfBANxcA2TgKAUOpDCGFhKg0RpXCwCwDHQHQHEyAIkCkOhbFOGA8A8DohBgRg9AccZcn8EpEjMLI2C2D' + 'YxAgQgvAIUIVkoAAPBQDJlECTZ3CCYwDACQwUA8A5MCAWAWDiQi4l8aQOEgLJuBgBgDmYFAzEoIoIl0WALgKYJbBABADAAHgHg8VAMmqCQQDMXABAATYwTmNwBDATJXA' + 'iAgjHmNQ5lgQ5QEQEQMmcWg/GwD5ylyNw2gMcJcjsBgBgOQQDDhRpVAMMwnDBFw1B0Ax8D0DxOmmJJIGQTY5hGMAwkwM4CAYLZAmAOJnAqAojiIGg6iieYkmeAYOHaKJ' + 'DCyCwjH6AoggsQpQliAJLhgaJ0CESBTnyDwjk+cg4g4P5IHIHJ+BWRRzlYWAxiOUxihsY4KjKLJRGqC44FCegkkkM58iAKAPnIWIWD8SRSFSfQnkmewUhYP4GiGKJ7G0' + 'TIbCSUoggqUo0lAQ4LnEcBcD8Coiiif4nE+eAAn2HpOkcFJqi4T5SkyMw/kqQown8IBIBOdA+A+DJrBqVxXEqYo4lCApLhGHBnD8S4ymyfxmg+cwQkQP5egOUZIWoEAk' + 'jIeIPBMBJBD+TBjBifwvkuc58hQJQPmFrYykkchclSApKjGOBuD+TRDFCfw3mmIxNi8FxFlOXhVC4aYDFyPgvg2YBcBcLZGCGCJ0DSLRzGSWQ/lmY5+mEP5gmMDBZRSM' + 'RsFsOxMhMJJ/DsTpTnwaQaE+N5ojuNhdEYNI5C4TZJO1GRDmCaxnA2Yx4n8IpIjOTBQBQC5TgyYw7gUYRYikC0BYRwsDQBoB8eA6Q2hsE0BUXgywZtYCyHMKwnxSAhAQ' + 'HkIQhRrBaDsCwA4ERiB2EWAIYIXhhiVEgAEUYwwYjyASLge4FhHgRDkM8OQih0jWPkGgBBAQ'); end; (Columns.Add('Item') as EXG2ANTTLib.Column).DisplayFilterButton := True; with (Columns.Add('Pos') as EXG2ANTTLib.Column) do begin AllowSizing := False; AllowSort := False; Width := 32; FormatColumn := '1 apos ``'; Position := 0; end; with Items do begin AddItem('Item A'); AddItem('Item B'); AddItem('Item C'); end; FilterBarPromptVisible := Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarToggle) Or Integer(EXG2ANTTLib.FilterBarVisibleEnum.exFilterBarPromptVisible); set_Background(EXG2ANTTLib.BackgroundPartEnum.exFooterFilterBarButton,$1000000); EndUpdate(); end |